Sandboxes
A sandbox is a separate environment for building and testing your integration before you take live payments.
How sandboxes work
Each sandbox has its own customers, payments, products, settings and API keys, apart from your live environment and other sandboxes. Payments in a sandbox move no money. Test cards and bank accounts determine whether they succeed, decline or end in a dispute.
Manage sandboxes
Your account starts with a sandbox. To add another, open the environment selector in the sidebar and click New sandbox. Switch between sandboxes and your live environment from the same selector.
Rename or delete the selected sandbox in Settings → Sandbox. Deleting a sandbox permanently deletes all of its data.
API keys
Each sandbox has its own API keys. Create them in Developers → API keys while the sandbox is selected. The secret key is shown once, when you create it.
Sandbox secret keys start with sk_test_ and live keys start with sk_live_. A sandbox key reads and writes only its own sandbox’s data.
Preflight checklist
Before you go live, run each flow your integration uses in a sandbox:
- Successful and declined payments, using the test payment methods.
- Checkout sessions, from creation to the
checkout_session.completedevent. - Your event stream handling.
- Refunds and disputes, if your integration handles them.
- Subscription renewals and failed renewals, if you sell subscriptions.
When everything works in a sandbox, go live.