Sandbox
Test cards
Card numbers that succeed, decline, ask for 3-D Secure or answer late on the simulated payment page of test mode.
On this page
In test mode, the card form is a simulation marked TEST: on the hosted checkout page, or on a page of its own when you confirm a payment through the API. It takes the numbers below and nothing else: any other number is refused with "use a test card", and is never stored. A real card never works in test mode.
Type a number on the page, or tap it in the page's list. If the page asks for an expiry date or a
security code, use any future date and any three digits. To pay without a browser, send the same
number to the test helper complete.
Five scenarios have two numbers, a Visa one and a Mastercard one, which end the same way. The
payment's card then names its network: visa or mastercard.
The numbers
Succeeds at once.
Succeeds at once.
A simulated 3-D Secure page opens. Approve: succeeds. Fail: declined, authentication_failed.
A simulated 3-D Secure page opens. Approve: succeeds. Fail: declined, authentication_failed.
Declined, card_declined.
Declined, card_declined.
Declined, card_declined with the decline code insufficient_funds.
Declined, card_declined with the decline code insufficient_funds.
Declined, expired_card.
Declined, expired_card.
Fails, processing_error.
Succeeds after 60 seconds; until then the payment is not confirmed.
Succeeds once, though the confirmation reaches AdProMaxPay several times and out of order.
No confirmation ever arrives: the payment never succeeds, and the attempt expires after about 30 minutes.
After a decline, the payment intent goes back to requires_payment_method, with the reason in
last_payment_error, and you receive payment_intent.payment_failed. Your customer can try another
card on the same page.
What each scenario teaches
- Success and Declined: your page for a paid order and your page for a failed one.
- 3-D Secure: the extra step a bank can ask for. Your code does nothing special; the hosted page handles it.
- Slow confirmation: your customer is back on your
success_urlbefore the payment is confirmed. Show "We are confirming your payment", and deliver on the webhook, not on the return. - Repeated notifications: you still receive one
payment_intent.succeededevent, though a webhook delivery itself may come twice: see deduplication. - Lost confirmation: a payment can end without money even after your customer went through the
payment page. Never deliver before
succeeded.
The whole picture of statuses is in How payments work. What else differs from live mode is in Sandbox and live: the differences.
When your test mode goes through a provider's sandbox
Our team can set your organization's test mode to go through a card provider's own sandbox (Chari
Pay's) instead of this simulation. A card payment then answers next_action.type: "redirect_to_url": your customer pays on the provider's sandbox page, with the provider's own
sandbox cards, not the numbers above, and the test helper complete does not apply. The payer's
name, email and phone are then required, as in live. Nothing paid there is real.