Simulate Authorizations and Refunds
Simulation card data
To test your payments integration, you can use test Primary Account Numbers (PANs), addresses, and CVCs to simulate various scenarios, including specific card brands, error code responses, and successful payments.
We currently support simulation card data for the following brands:
| Card Network | PAN | CVV/CVC | Expiration | Address |
|---|---|---|---|---|
| Visa | 4000 0000 0000 0002 | 111 | Any future date | 1234 Visa St, Visa, CA 12345 |
| Mastercard | 5555 5555 5555 4444 | 222 | Any future date | 2134 Mastercard St, Mastercard, CA 21345 |
Simulate authorizations
To simulate a successful authorization, use the simulation card data above with any amount that is not in the decline amounts table.
Authorization approvals
A successful authorization returns an AuthorizationEvent with a responseCode of APPROVED, along with verification response codes:
| Field | Description |
|---|---|
responseCode | APPROVED for a successful authorization |
avsResponseCode | Result of AVS address verification |
postalCodeResponseCode | Result of postal code verification |
cvvResponseCode | Result of CVV (security code) verification |
Authorization response code declines
RE_ENTER_TRANSACTION (19) is only triggered by the Mastercard amount-based test override ($44.44).To simulate a decline by response code, use one of the following transaction amounts. Set the desired card network using the simulation card data listed above.
| Error Code Response | Amounts | Retries Allowed |
|---|---|---|
DO_NOT_HONOR | $1.11 | |
INVALID_CARD_NUMBER | $2.22 | |
INSUFFICIENT_FUNDS | $3.33 | |
EXPIRED_CARD | $4.44 | |
BAD_CVV2 | $6.67 | |
UNACTIVATED_CARD | $7.77 | |
SUSPENDED_CARD | $8.88 | |
TERMINATED_CARD | $9.99 | |
INVALID_AUTHORIZATION_EXPIRATION | $11.11 | |
BLOCKED_CARD | $22.22 | |
TRANSACTION_NOT_PERMITTED | $33.33 | |
RE_ENTER_TRANSACTION | $44.44 | |
CLOSED_ACCOUNT | $55.55 | |
SPECIAL_CONDITION_NO_PICK_UP | $66.66 | |
INVALID_MERCHANT | $77.77 | |
INVALID_TRANSACTION | $88.88 | |
EXCEEDS_APPROVAL_AMOUNT_LIMIT | $99.99 | |
EXCEEDS_WITHDRAWAL_FREQUENCY_LIMIT | $111.11 | |
RESTRICTED_LOCATION | $222.22 |
Authorization card data declines
AVS declines always return DO_NOT_HONOR with result codes populated in separate response fields. RE_ENTER_TRANSACTION is not returned for AVS failures.
To simulate a decline by incorrect card data, use the wrong CVV or address (for AVS declines) with the test PANs above. The platform response depends on the card network and transaction (txn) type.
Visa
| Scenario | Response Code | Details |
|---|---|---|
| Incorrect CVV | BAD_CVV2 | Returns the N7 response code. |
| Incorrect address (non-verification) | DO_NOT_HONOR | Returns the 05 response code with addressCode or postalCode set to NO_MATCH. |
| Incorrect address (verification txn) | APPROVED | AVS result codes are still returned, but incorrect address data does not trigger a decline. |
Mastercard
| Scenario | Response Code | Details |
|---|---|---|
| Incorrect CVV | DO_NOT_HONOR | Returns the 05 response code with securityCode set to NO_MATCH. |
| Incorrect address (non-verification) | DO_NOT_HONOR | Returns the 05 response code along with the specific AVS codes. |
| Incorrect address (verification txn) | DO_NOT_HONOR | Same as non-verification. Mastercard does not exempt verification transactions from AVS declines. |
Visa returns APPROVED for verification transactions with incorrect address data, while Mastercard returns DO_NOT_HONOR. Test both networks to ensure your integration handles both responses.
Simulate refunds
Refunds are submitted against the original payment transaction (the first authorization), not against individual captures. The total captured amount is the refund limit, regardless of how many captures were made. Multiple partial refunds are supported as long as the total refunded amount does not exceed the total captured amount.
Use the refundPaymentTransaction mutation with the original paymentTransactionId to issue a refund. The response returns a PaymentCreditTransaction with an originatedPaymentTransactionId that references the original payment.
There are no dedicated refund event types. Instead, refund outcomes use authorization events:
| Refund outcome | Event |
|---|---|
| Approved | CardPaymentAuthorizedEvent |
| Declined | CardPaymentAuthorizationDeclinedEvent |
Refund approvals
To simulate an approved refund, use any amount that is not in the authorization declines table and does not exceed the captured amount of the original transaction.
Refund declines
To simulate a declined refund, use one of the decline amounts from the authorization declines table. For example, a refund amount of $1.11 triggers a DO_NOT_HONOR decline.