Getting started
Test mode
Build and test your integration with test keys. Payments, refunds and payouts are simulated; no real money moves.
Everything you do with a sk_test_ key happens in test mode. It runs the same code paths as live mode, with simulated money movements, so what works in test works in live.
What's simulated
| Flow | In test mode |
|---|---|
| Shopper payments | The widget offers a simulated payment instead of a real transfer or card charge. |
| Refunds | Complete without calling a payment provider. |
| Payouts | Simulated; a withdrawal completes after about a minute. |
| Deposits | Nothing to pay: you simulate the deposit instead. |
| Webhooks | Delivered for real to your test endpoint, signed with its own secret. |
Separate data
Test and live data are completely separate. Orders, customers, payments, balances and events created in test mode never appear in live mode, and the other way round. Ids look the same in both modes, so a test id simply returns 404 with a live key.
A test checklist
Before going live, run each of these in test mode:
- Create a checkout session and complete a simulated payment.
- Receive
order.createdandpayment.succeeded, and check your signature verification. - Retry a create with the same
Idempotency-Keyand confirm you get the same response. - Refund part of an order, then the rest, and receive
refund.succeeded. - Page through
GET /v1/orderswithlimitandcursor. - Handle a
400 VALIDATION_FAILED, a404 NOT_FOUNDand a429 RATE_LIMITED.
The Try it panel in this reference only accepts test secret keys, so you can explore safely from the docs.