Sandbox
Test cards
Card numbers that succeed, decline, ask for 3-D Secure or answer late on the simulated payment page of test mode.
In test mode, the card payment page is a simulation marked TEST. 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.
The numbers
Succeeds at once.
A simulated 3-D Secure page opens. Approve: succeeds. Fail: declined, authentication_failed.
Declined, card_declined.
Declined, card_declined with the decline code insufficient_funds.
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.