Stripe test mode is the built-in sandbox on every Stripe account, where you charge test cards and create test products without real payments, using test API keys that start with pk_test_ and sk_test_. For new integrations, Stripe now recommends a general sandbox instead, because test mode shares many of its settings with live mode.
That shared-settings point is the catch. If you change settings in the Dashboard while in the test mode sandbox, you might also change them in live mode. Many pages show a notification box and disable live settings while you're testing, and anything still enabled is safe. If you don't see that notification, Stripe says to assume your change affects live mode, unless you see a test data banner.
Test mode vs general sandboxes
| As of October 2026 | Test mode sandbox | General sandboxes |
|---|---|---|
| How many | One | Up to five, plus test mode |
| Settings | Shared with live mode | Fully isolated; copied from live when you create one |
| Access | Same roles as live mode | Private by default; you can invite people without live access |
| API support | V1, and V2 partly | V1 and V2 |
| Deletion | Can't be deleted | Can be deleted |
| Test cards and rate limits | Same as sandboxes | Same as test mode |
Use the test mode sandbox only for existing integrations that depend on it, or when a feature you need doesn't support general sandboxes. Neither lets you test IC+ pricing. Being in a sandbox in the Dashboard doesn't change your code's behaviour: the keys you use do.
The test cards you'll use most
For a successful payment, use 4242 4242 4242 4242 with any future expiry date, such as 12/34, and any three-digit CVC. The rest of the form can hold anything. These cards only work in sandboxes, and the Stripe Services Agreement prohibits testing in live mode with real card details.
| Card number | What it simulates |
|---|---|
| 4000 0000 0000 0002 | Generic decline |
| 4000 0000 0000 9995 | Decline for insufficient funds |
| 4000 0000 0000 0069 | Expired card |
| 4000 0000 0000 0127 | Incorrect CVC, as long as you enter a CVC |
| 4000 0000 0000 3220 | 3D Secure authentication required |
| 4000 0000 0000 0341 | Attaches to a customer, then fails when charged |
| 4000 0000 0000 5126 | Refund that starts as succeeded, then fails |
| 4000 0000 0000 0077 | Funds go straight to your available balance |
A few behaviours you wouldn't guess. Stripe skips the CVC check if you leave it blank, so it can't fail. Card-level state carries between tests, so use a different card for each independent scenario. In code, use a PaymentMethod such as pm_card_visa rather than a raw card number, or your code might not be PCI-compliant when you go live. And 3D Secure redirects don't happen for payments created directly in the Dashboard.
Other test-mode quirks
Sandboxes don't email customers by default, so paying a test invoice won't send a receipt unless you send it manually. The rate limiter is stricter in test environments than in live mode, so 429 errors mean you should slow down, and Stripe says not to load test in a sandbox at all. You can cancel a test card refund within 30 minutes, standing in for the short live window. To see what a customer in another country would see in Checkout or a Payment Link, add +location_US or another country code to a test email address.
Creating a general sandbox
- Go to the Sandboxes page in the Dashboard and click Create.
- New sandboxes are Private, so change the access level from the overflow menu if your team needs in.
- Copy the sandbox's test API keys and account ID somewhere your team can reach.
- Set up the products, customers, subscriptions and payment methods you'll test with.
- Update anything in your tests that depends on specific test object IDs.
Billing users can also add simulations, which move time forward so subscriptions change state and trigger webhook events without waiting days.
Clearing out test data
- In your sandbox, click Developers, then Overview.
- Under Test data, click Review test data to see what will go.
- Click Delete test data. This can't be undone, and the sandbox is unusable while it runs.
Meters aren't covered by the automated deletion, so you'll need to delete those yourself.
Going live
To take real payments, finish setting up your Stripe account, leave the sandbox with the account picker and swap in your live API keys. You can't process live payments while your integration still uses test keys. Keep live keys in a secrets vault or environment variables, never in source code or files checked into version control.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
My verdict on Stripe test mode
If you're starting fresh, I'd skip test mode and create a general sandbox, because isolated settings mean you can't break live checkout by accident. Run the decline, 3D Secure and refund-failure cards before launch, not just 4242, since those are the cases customers will hit. If you're testing a hosted flow, here's what Stripe Checkout includes, and for subscriptions, how Stripe Billing is priced and set up is worth reading alongside your test plan.
Testing is where most small teams cut corners, usually because nobody owns it. I run AI training and workshops for teams, and help businesses with AI enablement, AI automation and workflow set-up, so the tools you already pay for do more of the work. Most of that work is with SaaS marketing teams and small businesses. Here's how we can work together.
Frequently asked questions
What is the Stripe test card number?
4242 4242 4242 4242, with any future expiry date and any three-digit CVC, simulates a successful Visa payment in a sandbox.
Is Stripe test mode the same as a sandbox?
Test mode is a sandbox, but it shares settings with live mode. General sandboxes isolate settings and data, and Stripe recommends them for new integrations.
Can changes in Stripe test mode affect live mode?
Yes. Changing Dashboard settings in the test mode sandbox might also change them in live mode, unless the page shows a notification or test data banner.
How many sandboxes does a Stripe account get?
Up to five general sandboxes. The test mode sandbox doesn't count toward that limit.
Does Stripe send emails to customers in a sandbox?
Not by default. You can manually send an invoice or a receipt from the Dashboard if you want to check the email.


