Try it with test cards
Run a whole payment in a sandbox project with Stripe's test cards and a virtual charger, with no real money moving.
On this page
A sandbox project runs the same flow as a live one against Stripe's test mode, so a whole payment can be rehearsed with no real money. Nothing a sandbox project does touches live money.
What to use
A sandbox project and a sandbox API key (
flw_ak_test_...) that holdssettlement.payment.hold. See projects. A sandbox key reaches sandbox chargers only, and a sandbox project asking for real money is refused withaccountNotReady.A virtual charger, so no hardware is needed. Set its access to Paid.
Stripe's published test cards, typed into the Payment Element with any future expiry and any three-digit security code:
| Card number | What happens |
|---|---|
4242 4242 4242 4242 | The hold is authorized with no extra step |
4000 0025 0000 3155 | The bank asks for approval first (3-D Secure) |
4000 0000 0000 9995 | The card is declined |
Real cards do not work in test mode.
A run
Ask for a hold, confirm it with
4242 4242 4242 4242, and read the hold until it saysauthorized.Start the session, and see the virtual charger take it.
Stop it, wait for
captured, and read the receipt. It shows what was taken, and the rest was released.Do it again with
4000 0025 0000 3155, and complete the approval step.Do it once more with
4000 0000 0000 9995. Stripe's decline shows in your page, and the hold readsdeclined; a start under it is refused withholdNotAuthorized.Ask for a hold, confirm it, wait six minutes without starting, and see
windowEndedwhen you try.
Before you go live
Switch the project's API key to a live one. Nothing else in your code changes except the keys: the publishable key comes from the answer to the hold, so a live hold hands your page the live one.