Stripe Test Cards: The Complete 2026 Cheat Sheet for Developers
Stripe test cards let you simulate real payments without moving a cent. They're the fastest way to check that your checkout, subscriptions, and webhooks actually work before you flip the switch to live mode. If you're wiring up payments and need a card number that triggers a success, a decline, or a 3D Secure challenge on demand, this is the reference you want open in a second tab.
Here's the full cheat sheet, the gotchas that trip people up, and how to test the same flows when you're selling through a merchant of record instead of raw Stripe.
TL;DR
- Stripe test cards only work in test mode, with test API keys. They never charge a real card.
- The card you'll use most: 4242 4242 4242 4242 (Stripe's Visa test card for successful payments; no authentication required).
- Use any future expiry date, any 3-digit CVC (4 digits for American Express), and any postal code.
- Specific numbers trigger specific outcomes: declines, 3D Secure prompts, disputes, and country-specific cards.
- Testing matters most for the flows that break silently: failed renewals, webhook handling, and tax calculation. If you sell through a merchant of record like Creem, you test the same lifecycle but the tax and compliance edge cases are already handled for you.
What Stripe test cards are
Stripe runs in two modes: test and live. In test mode, you use test API keys (they start with sk_test_ and pk_test_) and a set of special card numbers that behave like real cards without touching a bank. You can run a full checkout, create a subscription, trigger a refund, and watch the webhooks fire, all without a real charge.
The moment you switch to live keys, these test numbers stop working and return an error. That's by design. It keeps test data out of your real books. Stripe Managed Payments is a separate merchant-of-record offering for eligible digital products, with tax and dispute responsibilities different from standard Stripe Payments.
The essential Stripe test cards
These are the numbers you'll reach for daily. For Stripe's test cards, use any future expiry (like 12/34), any 3-digit CVC (4 digits for American Express), and any postal code (like 42424).
Successful payments:
| Card number | Outcome and when to use it |
|---|---|
4242 4242 4242 4242 | Visa, the default success card. Use this 90% of the time. |
4000 0566 5566 5556 | Visa (debit) |
5555 5555 5555 4444 | Mastercard |
2223 0031 2200 3222 | Mastercard (2-series) |
3782 822463 10005 | American Express |
6011 1111 1111 1117 | Discover |
Declines (the ones that matter for error handling):
| Card number | Outcome and when to use it |
|---|---|
4000 0000 0000 0002 | Generic decline |
4000 0000 0000 9995 | Insufficient funds |
4000 0000 0000 9987 | Lost card |
4000 0000 0000 0069 | Expired card |
4000 0000 0000 0127 | Incorrect CVC |
4000 0000 0000 0119 | Processing error |
4000 0000 0000 0341 | Attaches to a customer, then fails when charged. Use it to test failed renewals. |
3D Secure / authentication:
| Card number | Outcome and when to use it |
|---|---|
4000 0027 6000 3184 | Authentication required on every transaction, saved-card charges included. |
4000 0000 0000 3220 | Authentication required. The charge succeeds only once it completes. |
4000 0000 0000 3055 | 3D Secure 2 supported, not required. Default Radar rules skip the challenge. |
The card numbers above are for typing into a checkout form. Your server-side test code should never send raw card numbers.
Stripe documents test PaymentMethod IDs for that job instead. pm_card_visa behaves like the default Visa card:
import Stripe from "stripe";
// sk_test_ key, loaded from your environment
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
const paymentIntent = await stripe.paymentIntents.create({
amount: 2000, // $20.00 in cents
currency: "usd",
payment_method: "pm_card_visa",
payment_method_types: ["card"],
confirm: true,
});
if (paymentIntent.status !== "succeeded") {
throw new Error(`Expected succeeded, got ${paymentIntent.status}`);
}
The amount is in the currency's smallest unit, and the test account needs card payments enabled for USD.
Limiting payment_method_types to card keeps redirect-based methods out, so confirm: true finishes the payment in one call.
A passing run proves your server can create and confirm a payment. It tells you nothing about browser checkout, 3D Secure prompts or order fulfillment.
Testing declines, disputes, and 3D Secure
The success card is the easy part. Next, test how your integration handles declines, disputes and authentication.
Declines. Your checkout should handle a declined card gracefully, showing the user a clear message instead of a stack trace. Run 4000 0000 0000 0002 and confirm your UI recovers. Then test 4000 0000 0000 9995 (insufficient funds) separately, because the decline code differs and you may want different messaging.
For a PaymentIntent API error, inspect type for card_error and decline_code for the card-specific reason, such as insufficient_funds, in your diagnostics rather than exposing those details to the customer. Assert that the failed order remains unpaid, checkout stays usable, and a retry with 4242 4242 4242 4242 completes the intended purchase without creating a duplicate order.
Disputes and chargebacks. Use 4000 0000 0000 0259 to create a simulated fraudulent dispute. With default account settings, Stripe says the payment succeeds and the dispute is created during the payment request.
Confirm your webhook receives charge.dispute.created and creates the intended internal alert or dispute record. This is a test, but chargebacks are expensive and time-sensitive in production, so the handling path is worth getting right.
3D Secure. European cards increasingly require Strong Customer Authentication. Card 4000 0027 6000 3184 requires authentication, so confirm your integration completes that step and the payment succeeds.
When Stripe displays its test authentication dialog, authorize the payment to test success, then test cancellation and failure. Confirm checkout can recover and your application does not fulfill an unpaid order. Skip this test and European customers can hit a checkout that dead-ends.
Testing subscriptions and failed renewals
Here's the failure you need to test for: a subscription renewal fails without the intended retry, notification or access update.
To test it, create a sandbox subscription with 4242 4242 4242 4242 and choose Run simulation on the subscription in the Stripe Dashboard. With the API, create a test clock and associate the customer and subscription with it.
Attach 4000 0000 0000 0341, which fails when charged, and set it as the payment method for the next subscription invoice. Check for a subscription-level default that overrides the customer default.
Advance the simulation to renewal and confirm that the invoice attempted payment and failed. Does your configured retry run? Does the customer get an email? Does access get revoked at the right time?
This is where most payment integrations are weakest, and it's the hardest thing to test by hand.
Stripe Billing can retry failed subscription and invoice payments with Smart Retries or a custom schedule, but you still need to configure and test recovery and make sure your application handles the events and access changes.
The webhook testing trap
Test cards confirm the charge. Webhooks confirm your app reacted to it. These are two different things, and the gap between them is where orders go missing.
When a payment succeeds, Stripe sends an event to your webhook endpoint. Your app is supposed to catch it and fulfill the order, grant access, or send the license key.
The event depends on your integration. A custom PaymentIntent flow gets payment_intent.succeeded once the charge goes through. A Checkout integration gets checkout.session.completed when the buyer finishes checkout, which can happen before the money arrives.
Check the session's payment_status and fulfill only when it reads paid. Bank debits and other delayed methods complete as unpaid first. For those, Stripe sends checkout.session.async_payment_succeeded when the payment clears, and that event is your signal to fulfill.
Stripe can deliver the same event twice, and your return page can call fulfillment too. Key fulfillment to the Checkout Session or order ID and skip anything already fulfilled.
If your endpoint is down, slow, or mishandles the event, the customer pays and gets nothing.
Test the full loop: run a test card, then confirm the webhook arrived, was verified with your signing secret, and triggered the right action.
The Stripe CLI covers the local side. stripe listen forwards events from your test account to a local endpoint and prints that session's signing secret. stripe trigger builds fresh test objects from a fixture and fires the events they produce, so every run creates a new event.
To send an event you already received a second time, run stripe events resend with its event ID and the destination webhook endpoint ID. Use this to test duplicate delivery to a registered endpoint.
For a deeper webhook workflow, a tool like webhook.site helps you inspect raw payloads before you write handler code.
Then run one successful purchase end to end and check each step:
- Start with a fresh test account that has no paid access.
- Buy one known product or plan with
4242 4242 4242 4242, and check that the amount and currency match the price you set. - Record the PaymentIntent or Checkout Session ID next to your internal order ID.
- Confirm the order is saved and the account has exactly the access that product grants.
- Repeat the purchase with a fresh test account and close the browser before the return page loads. The webhook alone should grant access, exactly once, even after you resend the event.
- Delete or reset the test account and order so the next run starts clean.
How this works with a merchant of record
Everything above assumes you're integrating standard Stripe Payments directly, which means you own the entire payment lifecycle: declines, disputes, 3D Secure, dunning, webhooks, and the tax layer on top.
If you sell through a merchant of record like Creem, you still test your integration with sandbox payments.
Creem is the legal seller, so it owns chargeback handling and 3D Secure compliance, and it calculates, collects, files and remits VAT, GST and sales tax for buyer payments in 190+ countries.
You test that your product gets fulfilled when a payment succeeds, and Creem handles what happens when a French customer's bank demands SCA or a buyer disputes a charge six weeks later.
Turn on Test Mode in the Creem dashboard before you check out. Creem's test mode uses its own card numbers, not Stripe's. Use any future expiry date, any CVV and any billing details:
4111 1111 1111 1111— successful payment.4507 9900 0000 0028— card declined.4507 9900 0000 0010— insufficient funds.4507 9900 0000 0044— incorrect CVC.
The practical difference: with standard Stripe Payments you configure retries in Stripe Billing, then still own the compliance work and the code that reacts to every failed or recovered payment.
With an MoR, you wire up fulfillment and let the platform own the messy parts. Creem also runs failed-payment recovery for renewals. For a solo founder or small team, that's fewer test cases you have to think about and fewer ways to lose revenue silently.
See the pricing page for what that costs.
Common mistakes with Stripe test cards
- Using test cards in live mode. They'll fail. Test numbers only work with test keys. Check that your browser publishable key and server secret key belong to the intended test environment and that required test configuration is present. Make automated tests stop if that configuration is missing rather than fall back to live credentials.
- Real card in test mode. Use documented test cards or test payment methods instead of real card details. Test fixtures produce controlled outcomes in the test environment, while live payments use live credentials.
- Only testing the success path. The
4242card passing doesn't mean your integration is done. Declines, disputes, and failed renewals are where production breaks. - Forgetting webhooks. A successful charge with a broken webhook means the customer paid and got nothing.
- Skipping 3D Secure. If you sell to Europe, test SCA so your checkout can complete authentication when it's required. An untested flow can leave a customer unable to finish paying.
Ship a checkout that actually works
Stripe test cards are the difference between "it worked on my machine" and a checkout that survives real customers. Bookmark the numbers, test the decline and 3D Secure paths, and never trust a 4242 success as proof you're done.
If you'd rather not build the entire decline-recovery, dispute, and tax-compliance stack yourself, Creem handles the payment lifecycle as your merchant of record so you can focus on shipping product.
Try Creem, wire up your first product in under 30 minutes and test it end to end.
FAQ
What is the Stripe test card number? Stripe’s standard successful-payment test card is 4242 4242 4242 4242 (Visa). Use it in test mode with test API keys, any future expiry date, any 3-digit CVC, and any postal code.
Do Stripe test cards charge real money? No. Test cards only work in test mode with test API keys and never move real funds. They're built to simulate outcomes safely.
How do I test a declined payment in Stripe? Use 4000 0000 0000 0002 for a generic decline, or 4000 0000 0000 9995 for insufficient funds. Confirm your checkout shows a clear error and recovers.
How do I test 3D Secure with Stripe? Use 4000 0027 6000 3184, which Stripe sets to require authentication on every transaction. In test mode Stripe then shows a page where you complete or fail the challenge, so check that your integration handles both results.
Why does my Stripe test card fail in production? Because test cards only work in test mode. Once you switch to live API keys, those numbers return an error by design. You need a real card in live mode.
Do I still need test cards if I use a merchant of record? Yes, you test your own integration with sandbox payments, but the merchant of record handles the harder compliance and chargeback edge cases, so there's less for you to build and test.
Why did my test payment succeed but access was never granted? Your payment succeeded, but your application's fulfillment path did not grant access. Check where the handoff failed:
- Confirm the payment succeeded with the provider.
- Match the payment or session ID to your internal order.
- Check the webhook delivery log and your endpoint's response.
- Check that your handler verifies Stripe's signature against the unmodified raw request body.
- Check the access or entitlement update. Make fulfillment idempotent on the order ID: Creem's automatic retries keep the event ID, while a manual resend gets a new one.
Log payment and event IDs, never secrets or card data. Follow the checklist in “The webhook testing trap” to test the full purchase.
