What is a Stripe test card?

A Stripe test card is a fake card number that runs a payment through test mode without moving real money. The standard card is 4242 4242 4242 4242, paired with any future expiry date, any three-digit CVC, and any billing ZIP code. Stripe returns a successful charge and never contacts a bank.

Test cards exist so you can build and check checkout flows before switching your account to live mode. They map to specific responses, such as a decline or a 3D Secure challenge, which lets you test error handling on purpose.

Which Stripe test card numbers should you use?

Stripe publishes a fixed set of numbers. Each one triggers a known result, so pick the card that matches the scenario you want to test.

Successful payment cards by brand

  • Visa: 4242 4242 4242 4242
  • Mastercard: 5555 5555 5555 4444
  • Mastercard 2-series: 2223 0031 2200 3222
  • American Express: 3782 822463 10005
  • Discover: 6011 1111 1111 1117
  • Diners Club: 3056 9300 0902 0004
  • JCB: 3566 0020 2036 0505
  • UnionPay: 6200 0000 0000 0005

Brand matters for the card icon, the BIN lookup, and the field layout. Amex, for example, uses a four-digit CVC and a 15-digit number, so your form needs to accept both shapes.

Decline and error test cards

  • 4000 0000 0000 0002: generic decline (card_declined)
  • 4000 0000 0000 9995: insufficient funds
  • 4000 0000 0000 0069: expired card
  • 4000 0000 0000 0127: incorrect CVC
  • 4000 0000 0000 0119: processing error

Run each of these through your form and check the message your customer sees. A vague "something went wrong" on an expired card frustrates people who could fix the problem in seconds.

3D Secure test cards

4000 0025 0000 3155 forces a 3D Secure authentication step, and 4000 0000 0000 3220 triggers the 3D Secure 2 flow. Use these to confirm your redirect, return URL, and webhook handling all work when a challenge appears.

What expiry date, CVC, and ZIP should you enter?

Stripe accepts any expiry date in the future, any three-digit CVC (four digits for Amex), and any billing ZIP code. Reusing 12/34 and 123 across every test keeps the process boring, which is what you want.

Two fields must look wrong on purpose to test validation: an expiry in the past and a CVC with the wrong length. Stripe rejects both before the charge leaves your page in most integrations.

How do Stripe test cards differ from live cards?

Test numbers are not issued by a bank and have no attached account. Stripe routes them through its own test mode, so no authorization reaches a real card network and no funds move.

The same number that succeeds in test mode will fail in live mode. Live mode sends the request to the real network, where 4242 4242 4242 4242 does not exist as an account.

  • Test mode: fake data, real API responses, no money.
  • Live mode: real cards, real authorizations, real settlement.
  • Keys: test keys start with pk_test_ and sk_test_; live keys do not carry the test prefix.

How do you use test cards in Stripe Checkout and Elements?

Toggle your dashboard to test mode, then open any payment page built with your test keys. Paste a test number into the card field and submit. Checkout adds a banner that says TEST MODE so you can tell the two environments apart.

  1. Switch the Dashboard to test mode and copy the test API keys.
  2. Load your checkout page with those keys.
  3. Enter a test card, a future expiry, and a CVC.
  4. Submit and confirm the charge shows in the Dashboard under Test payments.
  5. Repeat with a decline card to check your error path.

Webhooks fire in test mode too. Point a test endpoint at your handler and watch the payment_intent.succeeded and payment_intent.payment_failed events arrive.

Common mistakes when testing with Stripe cards

  • Using live keys with test numbers, which returns a "no such card" style error.
  • Testing one brand and assuming the layout holds for Amex or UnionPay.
  • Skipping the decline cases, so broken error messages reach production.
  • Forgetting the 3D Secure cards until a customer hits a challenge.
  • Hard-coding card numbers into a shared codebase that later runs in live mode.

Keep test numbers in a separate config file or a fixture, not in your production bundle. A stray "4242" in a live form will confuse support staff who read error logs later.

Frequently asked questions

Do Stripe test cards work in live mode?

No. Test numbers are valid only in test mode. In live mode the request goes to the card network, which has no matching account, so the charge fails.

Can a Stripe test card charge real money?

No. Test mode never reaches a bank and never settles funds. The Dashboard records the payment as a test payment and excludes it from payouts.

Are the test card numbers the same for every country?

Yes. The numbers are tied to Stripe's test environment, not to a country. Your account's country affects which payment methods you can enable, but not the test card list.

What is the CVC for 4242 4242 4242 4242?

Any three digits work, such as 123 or 999. Amex test cards need four digits because the real card format uses four.

Why does my test card get declined when I expect success?

Check that you loaded test keys, that the expiry date is in the future, and that the number has no spaces or typos. A card declined in test mode with 4242 usually means a live key is in the page.

A short word on real card data

Test cards exist so nobody has to type a real card number into a staging site. Storing live card data puts you in scope for PCI DSS, which brings audits, network scans, and strict rules on encryption and access. Keep test data in test, and let Stripe's hosted fields handle real numbers when you go live.