Stripe Test Card Numbers: A Developer Guide

A Stripe test card is a fake card number that Stripe accepts only in test mode, letting you run charges, refunds, and deliberate failures without touching a real card network. The standard one is 4242 4242 4242 4242, paired with any future expiry date, any three digit CVC, and any postal code. Because test mode and live mode are completely separate environments, a Stripe test card can never move real money or affect a live customer.

How Stripe test mode works

Test mode is a parallel copy of your Stripe account. It has its own API keys, its own customers, and its own payment history. Anything you create with a test key stays in test mode, and anything created with a live key stays in live mode. You cannot mix the two, which means a successful test charge proves your integration logic works, not that your live account is configured correctly.

Stripe publishes a set of card numbers where the outcome is hard coded. Each number maps to a specific result: success, a decline, a fraud block, or a 3D Secure challenge. You pick the number that matches the scenario you want to test.

The main Stripe test card numbers

These cards all complete a payment successfully. Use them to verify your happy path end to end.

For every one of these, any three digit CVC works (four digits for Amex), and any expiry date in the future is accepted.

Cards that simulate declines and errors

Real integrations break in specific ways, so Stripe gives you a number for each failure mode. Wire these into your error handling tests.

Each decline returns a specific code and message through the API. Confirm that your checkout page shows the customer a sensible message instead of a raw error string.

3D Secure test cards

Strong Customer Authentication flows need their own numbers because the card must trigger an authentication step before the charge can complete.

Stripe also exposes server side payment method tokens such as tok_visa and tok_mastercard, which skip the raw card entry step and are handy for automated test suites.

How to use a Stripe test card correctly

  1. Confirm your dashboard is toggled to test mode and you are using keys that start with pk_test_ and sk_test_.
  2. Enter the card number in your own checkout form so you exercise the same code path customers will hit.
  3. Use any future expiry date and any CVC unless the scenario you are testing requires a mismatch.
  4. Open the dashboard and inspect the resulting PaymentIntent or charge, including the decline code if the payment failed.
  5. For subscriptions and free trials, use a test clock so you can advance time instead of waiting weeks.

Common mistakes to avoid

Frequently asked questions

Does the CVC or ZIP code matter on a Stripe test card?

For the standard success cards, no. Any CVC and any postal code pass. Use the dedicated decline cards when you want to test a CVC or address verification failure.

Can I use a Stripe test card in live mode?

No. Test numbers are rejected outside test mode. If a test card appears to work in live mode, you are almost certainly pointed at the wrong API keys.

Are test mode payments free?

Yes. No real funds move and no card network fees apply, so you can run as many test transactions as you need while building out your integration.

More

Read our complete guide: Buy CVV Cheap: Pricing, Risks, and What First-Time Buyers Need to Know