Stripe test mode vs sandbox: what changed, and how to move off legacy

Updated 2026-07-26

Stripe replaced its single legacy test mode with sandboxes: isolated copies of your account, each with its own API keys, webhooks, data and configuration. You get up to 5 per account, they are free, and they are now the default way to test.

The confusing part is that "test mode" hasn't disappeared from how people talk about Stripe. Nothing changes about the money. No real charge happens in a sandbox, and the same test card 4242 4242 4242 4242 still works. What changed is where that testing lives. Legacy test mode was one non-live view bolted onto your single account. A sandbox is a separate copy of the account. So the real question isn't "test or live," it's "which environment do I test in now, and how do I get my old integration off the legacy view."

The one table you need

EnvironmentKeys / dataIsolationBest for
Legacy test modeOne set of test keys, tied to your single accountShares config with live; no separation between testersOlder integrations not yet migrated
SandboxOwn API keys, webhooks, data and settings per sandbox (up to 5)Fully isolated copy of the accountDay-to-day development, CI, staging, demos
ProductionLive keys, real customers, real chargesThe real account; changes affect real moneyServing actual payments

Why the model changed

With one shared test view, everyone stepped on each other. One developer's webhook change, test data or setting was visible to everyone else testing against the same account. Sandboxes fix that by isolation. Each sandbox is its own copy with independent keys and configuration, so a change in one doesn't leak into another or into production. That's the whole point: you can hand a sandbox to CI, another to a developer rebuilding checkout, and another to sales for demos, without any of them colliding.

Choose by job

How to migrate off legacy test mode

  1. Create a sandbox for each distinct need (dev, CI, staging) rather than reusing one for everything. You have room for up to five.
  2. Swap the API keys. Each sandbox issues its own publishable and secret keys. Replace the legacy test keys in your config with the sandbox's keys.
  3. Re-point every webhook. Webhook endpoints are per environment. Register your endpoints inside the sandbox and update the signing secret you verify against, or events won't arrive.
  4. Re-seed configuration. A sandbox is a fresh copy, so products, prices, coupons and other setup you relied on in test mode may need to be recreated or re-imported.

The mistakes that cost teams a day

FAQ

What is the difference between Stripe test mode and a sandbox?

Legacy test mode was a single non-live view of your one Stripe account, sharing configuration with the live side. A sandbox is an isolated copy of the account with its own API keys, webhooks, data and settings. You can run several sandboxes at once, and changes in one do not touch production or another sandbox.

Are Stripe sandboxes free?

Yes. Sandboxes are part of every Stripe account at no extra cost. You are not billed for creating or using them, and no real money moves through them.

How many sandboxes can I have?

Up to 5 per account. That is usually enough to give a few developers, a CI pipeline and a staging environment their own isolated space instead of everyone sharing one test view.

Do I still need to update my webhooks and API keys when I migrate?

Yes. Each sandbox has its own publishable and secret keys and its own webhook endpoints. Any key or endpoint you hardcoded against legacy test mode has to be re-pointed at the sandbox, or events and calls will go to the wrong place.

Sources: Stripe: Sandboxes ↗

Sandbox limits and behaviour are Stripe-published as of 2026-07-26; some features differ from production, so confirm parity for anything payment-critical against the current docs.

The Sandbox Brief

Every sandbox worth knowing, once a month.

The refreshed benchmark, pricing changes, new entrants and one sharp take. Read by engineers choosing where their agents and apps run. No fluff.

Free · unsubscribe anytime · no spam.