Sandbox: Card Acquiring
Card acquiring is available in the sandbox only. The sandbox moves no real money and authorizes no real cards: this page lists the test cards, the 3D Secure cards and the values that trigger a specific outcome, so you can exercise the paths your integration has to handle.
Send the cards in clear to the relay on the server-to-server route, never to the API host, and type them on the hosted page on the hosted checkout. Use any future expiry date, any 3-digit security code and any holder name.
Test cards
Outcome by card number
| Card | Result | Event you receive |
|---|---|---|
4507 9900 0000 0002 | Approved | ACQUIRING-PAYMENT-CAPTURED |
4507 9900 0000 0028 | Declined by the bank | ACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL" |
4507 9900 0000 0010 | Insufficient funds | ACQUIRING-PAYMENT-DECLINED, declineBucket: "RETRYABLE" |
4507 9900 0000 0036 | Do not honor | ACQUIRING-PAYMENT-DECLINED, declineBucket: "RETRYABLE" |
4507 9900 0000 0044 | Invalid security code | ACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL" |
4507 9900 0000 0051 | Invalid card data | ACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL" |
4507 9900 0000 0069 | Reported stolen | ACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL", failureCode: "FRAUD_DECLINED" |
4507 9900 0000 0077 | Technical error | ACQUIRING-PAYMENT-ERROR |
A second acquirer
These cards run through a second acquirer connection of the sandbox. The declineBucket on the event tells whether a retry can succeed.
| Card | Result | Event you receive |
|---|---|---|
2223 0000 0000 0031 | Approved | ACQUIRING-PAYMENT-CAPTURED |
2223 0000 0000 0015 | Declined: new card not yet unblocked by the holder | ACQUIRING-PAYMENT-DECLINED, declineBucket: "RETRYABLE" |
2223 0000 0000 0072 | Declined by the bank | ACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL" |
2223 0000 0000 0056 | Acquirer timeout; never approved | ACQUIRING-PAYMENT-ERROR |
3D Secure
3D Secure only runs when the sale asks for it: when the payment saves a card, when it pays a saved card with the cardholder present, or when your account is set to require 3D Secure on every sale. Your sandbox account uses the standard setting, so a payment without saveCard or savedCard goes straight through and these cards are simply approved. To see them behave, send saveCard; ask Avenia if you want your account set to require 3D Secure on every sale.
| Card | Behaviour |
|---|---|
4556 5579 5572 6624 | Visa, authenticated without a challenge (frictionless). |
4916 9940 6425 2017 | Visa, shows a challenge. |
5306 8899 4283 3340 | Mastercard, shows a challenge. |
For the challenge cards, the answer carries a redirectUrl. Open it in a browser: in the challenge, the code 1234 authenticates successfully, and any other code fails authentication and declines the payment.
Not accepted
Prepaid cards are refused at payment time with 400 prepaid cards are not accepted.
Simulated chargebacks
Create a payment through the relay whose externalId is one of the values below, with the approved card 4507990000000002. About two minutes later the test acquirer opens a chargeback on it, and the dispute arrives as it would in production: the CARD-DISPUTE-<STATUS> events under DISPUTE, and the dispute in GET /v2/account/disputes/card.
externalId | Dispute status | reason | Events |
|---|---|---|---|
SUCCEEDED+CHARGEBACK action_required | RECEIVED | REQUESTED_BY_CUSTOMER | CARD-DISPUTE-RECEIVED |
SUCCEEDED+CHARGEBACK review | PENDING_REVIEW | REQUESTED_BY_CUSTOMER | CARD-DISPUTE-PENDING_REVIEW |
SUCCEEDED+CHARGEBACK won | WON | REQUESTED_BY_CUSTOMER | CARD-DISPUTE-RECEIVED, then CARD-DISPUTE-WON |
SUCCEEDED+CHARGEBACK lost | LOST | REQUESTED_BY_CUSTOMER | CARD-DISPUTE-LOST |
- The outcome must be exactly one of the four words. Case and extra spaces are ignored:
SUCCEEDED+CHARGEBACK Lost,SUCCEEDED+CHARGEBACK LOST,SUCCEEDED+CHARGEBACK lost. Anything else after the word (for exampleSUCCEEDED+CHARGEBACK lost 2) falls back toaction_required. - On an open dispute (
RECEIVEDorPENDING_REVIEW) you can try accepting (CARD-DISPUTE-ACCEPTED), or uploading evidence and contesting. In the sandbox, the test acquirer does not take contests: the evidence upload works (201), and the contest answers409 this dispute's acquirer does not take a contest; nothing was decided, and new evidence will not change that: raise it with us. Accepting works. A dispute alreadyPENDING_REVIEW(thereviewoutcome) cannot be contested either.
Settling, on request
Settlement does not run on a schedule in the sandbox: you settle when you choose, with POST /settlements/settle-now. The fees, the reserve, the ledger and the events are computed as in production, and the payout is simulated. A sale is paid in the output currency of its quote: to be paid in USDC or USDT, quote the sale with that outputCurrency.
Refunds that wait for approval
In the sandbox you play the person who decides a refund above your cover, with POST /refunds/{refund-id}/simulate-decision. To get one: settle a payment with settle-now, then refund it in full.
Saved cards
A saved card cannot be charged without the cardholder in the sandbox: see Saved Cards. Saving, listing, revoking and paying a saved card with the cardholder present all work.
A checklist of cases to test
- An approved card, a declined card (one
RETRYABLE, oneTERMINAL) and a technical error. - A frictionless 3D Secure card, and a challenge, passed and failed.
- A timeout retry with the same
quoteTokenand body. - A full refund, a partial refund and a refund that waits for approval.
- Each simulated chargeback outcome, accepting a dispute and uploading evidence.
- A settlement, with
settle-now, and the reads of the schedule, statement and balance.