Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

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​

CardResultEvent you receive
4507 9900 0000 0002ApprovedACQUIRING-PAYMENT-CAPTURED
4507 9900 0000 0028Declined by the bankACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL"
4507 9900 0000 0010Insufficient fundsACQUIRING-PAYMENT-DECLINED, declineBucket: "RETRYABLE"
4507 9900 0000 0036Do not honorACQUIRING-PAYMENT-DECLINED, declineBucket: "RETRYABLE"
4507 9900 0000 0044Invalid security codeACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL"
4507 9900 0000 0051Invalid card dataACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL"
4507 9900 0000 0069Reported stolenACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL", failureCode: "FRAUD_DECLINED"
4507 9900 0000 0077Technical errorACQUIRING-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.

CardResultEvent you receive
2223 0000 0000 0031ApprovedACQUIRING-PAYMENT-CAPTURED
2223 0000 0000 0015Declined: new card not yet unblocked by the holderACQUIRING-PAYMENT-DECLINED, declineBucket: "RETRYABLE"
2223 0000 0000 0072Declined by the bankACQUIRING-PAYMENT-DECLINED, declineBucket: "TERMINAL"
2223 0000 0000 0056Acquirer timeout; never approvedACQUIRING-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.

CardBehaviour
4556 5579 5572 6624Visa, authenticated without a challenge (frictionless).
4916 9940 6425 2017Visa, shows a challenge.
5306 8899 4283 3340Mastercard, 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.

externalIdDispute statusreasonEvents
SUCCEEDED+CHARGEBACK action_requiredRECEIVEDREQUESTED_BY_CUSTOMERCARD-DISPUTE-RECEIVED
SUCCEEDED+CHARGEBACK reviewPENDING_REVIEWREQUESTED_BY_CUSTOMERCARD-DISPUTE-PENDING_REVIEW
SUCCEEDED+CHARGEBACK wonWONREQUESTED_BY_CUSTOMERCARD-DISPUTE-RECEIVED, then CARD-DISPUTE-WON
SUCCEEDED+CHARGEBACK lostLOSTREQUESTED_BY_CUSTOMERCARD-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 example SUCCEEDED+CHARGEBACK lost 2) falls back to action_required.
  • On an open dispute (RECEIVED or PENDING_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 answers 409 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 already PENDING_REVIEW (the review outcome) 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, one TERMINAL) and a technical error.
  • A frictionless 3D Secure card, and a challenge, passed and failed.
  • A timeout retry with the same quoteToken and 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.