# Credit Card

Zūm Rails offers card payment methods designed for ease and efficiency. For example, credit card's can be used for accounts receivable transactions to request funds.&#x20;

`Method: POST`

`Endpoint: {{env}}/api/transaction`&#x20;

**Example**

{% tabs %}
{% tab title="Request Payload" %}

```json
{
  "ZumRailsType": "AccountsReceivable",
  "TransactionMethod": "CreditCard",
  "Amount": 123.45,
  "Memo": "Memo",
  "Comment": "This transaction is just a test from a user to wallet",
  "UserId": "1d431e8b-...85452adb4eee",
  "Authorize": {
    "Capture": false,
    "AutoExpireDays": 5
  }
}
```

{% endtab %}
{% endtabs %}

## Refund a Transaction

With Zūm Rails, it is easy to refund Credit Card transactions. Currently we support whole/partial refunds of initial transactions. When you create a new refund, you must specify the transaction ID that you wish to refund. Creating a new refund will refund a transaction that has previously been created but not yet refunded. Funds will be refunded to the credit card that was originally charged.

`Method: POST`

`Endpoint: {{env}}/api/transaction/{transaction_id}/refund`

## Chargeback

Chargeback applies only for credit card transactions and it can be accepted or disputed by the user until the due date. After the chargeback due date passes, the chargeback is accepted by default.

#### Accept Chargeback <a href="#accept-chargeback" id="accept-chargeback"></a>

Use this endpoint to accept a specific chargeback for a credit card transaction.

`Method: PATCH`

`Endpoint: {{env}}/api/TransactionChargeback/{{TransactionChargebackId}}/accept`

**Dispute Chargeback**

Use this endpoint to dispute a specific chargeback for a credit card transaction.

`Method: PATCH`

`Endpoint: {{env}}/api/TransactionChargeback/{{TransactionChargebackId}}/dispute`

{% hint style="info" %}
NOTE

A chargeback cannot be disputed if it is already accepted or disputed or is past due date.
{% endhint %}

## **Processing Schedule**

**Credit Card - Bambora**

* Transactions are sent when they are created;
* Responses are received right away;

**Credit Card - Authorize.net**

* Transactions are sent when they are created;
* Responses are received right away;

## **Transaction Limits**

| Transaction Limit            | Minimum | Maximum     |
| ---------------------------- | ------- | ----------- |
| Amount limit per transaction | $0.00   | Unlimited   |
| Maximum volume per day       | $0.00   | Unlimited   |
| Transaction per day          | $0.00   | $99,999,999 |
| Maximum Volume Per Month     | $0.00   | Unlimited   |

## **Transaction Events**

<table><thead><tr><th width="149">Payment Method</th><th>Event</th><th>Description</th></tr></thead><tbody><tr><td>CreditCard</td><td>CreditCardInvalidRequest</td><td>When transaction has failed due to invalid request</td></tr><tr><td>CreditCard</td><td>CreditCardRejectedByIssuingBank</td><td>When transaction is rejected by issuing bank</td></tr><tr><td>CreditCard</td><td>CreditCardExpiredCard</td><td>When transaction has failed due to expired card</td></tr><tr><td>CreditCard</td><td>CreditCardSuspectedFraud</td><td>When transaction has failed due to suspected fraud</td></tr><tr><td>CreditCard</td><td>CreditCardTransactionNotPermitted</td><td>When transaction is not permitted</td></tr><tr><td>CreditCard</td><td>CreditCardContactSupport</td><td>When transaction has failed. Contact support</td></tr><tr><td>CreditCard</td><td>CreditCardInvalidMerchantSetUp</td><td>When transaction has failed due to invalid merchant setup</td></tr><tr><td>CreditCard</td><td>CreditCardSecurityViolation</td><td>When transaction has failed due to security violation</td></tr><tr><td>CreditCard</td><td>CreditCardInvalidCardOrDetails</td><td>When transaction has failed due to invalid card or card details</td></tr><tr><td>CreditCard</td><td>CreditCardLostOrStolenCard</td><td>When transaction has failed due to lost ot stolen card</td></tr><tr><td>CreditCard</td><td>CreditCardAccountClosedOrBlocked</td><td>When transaction has failed due to account closed or blocked</td></tr><tr><td>CreditCard</td><td>CreditCardDeemedHighRisk</td><td>When transaction has failed due to deemed high risk</td></tr><tr><td>CreditCard</td><td>CreditCardUnknownResponseFromIssuingBank</td><td>When transaction has failed due to unknown response from issuing bank</td></tr><tr><td>CreditCard</td><td>CreditCardCouldNotLocateOriginalTransaction</td><td>When reversal transaction has failed due to could not locate original transaction</td></tr><tr><td>CreditCard</td><td>CreditCardTransactionAlreadyReversed</td><td>When reversal transaction has failed due to already reversed</td></tr><tr><td>CreditCard</td><td>CreditCardGenericError</td><td>When transaction has failed due to generic error</td></tr><tr><td>CreditCard</td><td>CreditCardServiceUnavailable</td><td>When transaction has failed due to service unavailable</td></tr><tr><td>CreditCard</td><td>CreditCardRetryLater</td><td>When transaction has failed. Retry later</td></tr><tr><td>CreditCard</td><td>CreditCardReversalRejected</td><td>When reversal transaction is rejected</td></tr><tr><td>CreditCard</td><td>CreditCardDuplicateReversal</td><td>When reversal transaction has failed due to duplicated</td></tr><tr><td>CreditCard</td><td>CreditCardTransactionAlreadySettled</td><td>When reversal transaction has failed due to already settled</td></tr><tr><td>CreditCard</td><td>CreditCardTimeoutReversal</td><td>When reversal transaction has failed due to timeout</td></tr><tr><td>CreditCard</td><td>CreditCardDuplicateTransaction</td><td>When transaction was rejected as duplicate</td></tr><tr><td>CreditCard</td><td>CreditCardNotActivated</td><td>When transaction failed due to inactive card</td></tr></tbody></table>

## Testing

### Transactions

To simulate an Credit Card transaction failure, include an event name from the list above in the COMMENT field when creating a transaction. If you don't mention an event in the COMMENT, the transaction will change its status to "Completed" in the sandbox environment.

**Examples:**

{% tabs %}
{% tab title="Simulating Success" %}

```json
{
  "ZumRailsType": "AccountsReceivable",
  "TransactionMethod": "CreditCard",
  "Amount": 123.45,
  "Memo": "Memo",
  "Comment": "This transaction will succeed because there's no keyword",
  "UserId": "1d431e8b-...85452adb4eee",
  "WalletId": "8ebd932b-...b92633e14297",
  "PaymentInstrumentId": "92142401-...389ba0d87e75"
}
```

{% endtab %}

{% tab title="Simulating Failure" %}

```json
{
  "TransactionMethod": "CreditCard",
  "Amount": 123.45,
  "Memo": "Memo",
  "Comment": "CreditCardExpiredCard",
  "UserId": "1d431e8b-...85452adb4eee",
  "WalletId": "8ebd932b-...b92633e14297",
  "PaymentInstrumentId": "92142401-...389ba0d87e75"
}
```

{% endtab %}
{% endtabs %}

### Chargebacks

To simulate chargeback reasons and statuses, include specific keywords in the transaction's COMMENT field when creating a transaction. This will trigger a chargeback with the indicated reason and status within minutes.

For instance, if the COMMENT field has "chargebackreasonfraud chargebackstatewon," a simulated chargeback is generated with the reason "Fraud" and a pending status, which later updates to "Won."

{% hint style="warning" %}
The following keywords only simulate chargebacks for Canadian customers. Please reach out to <support@zumrails.com> for more information.
{% endhint %}

#### Chargeback Reason

| Keyword                   | Chargeback Reason |
| ------------------------- | ----------------- |
| chargebackreasonclerical  | Clerical          |
| chargebackreasonfraud     | Fraud             |
| chargebackreasoninquiry   | Inquiry           |
| chargebackreasonquality   | Quality           |
| chargebackreasontechnical | Technical         |

#### Chargeback Status

| Keyword                    | Chargeback Status |
| -------------------------- | ----------------- |
| chargebackstatepending     | Pending           |
| chargebackstateunderreview | Under Review      |
| chargebackstatewon         | Won               |
| chargebackstatelost        | Lost              |
