What a Stripe test card is

A Stripe test card is a card number that only works in test mode. It looks like a real card number, but Stripe never charges it. You use it to build and check payment flows without moving real money. The most common one is 4242 4242 4242 4242. Any future expiry date and any three-digit CVC will work.

Why test cards matter

Developers need to see how their checkout behaves when a card is declined, when 3D Secure pops up, or when a bank asks for authentication. Real cards cannot do that safely or repeatably. Test cards give you a predictable result every time. They also let you test refunds, subscriptions, and webhooks without waiting for a bank.

Common Stripe test card numbers

  • 4242 4242 4242 4242: Visa, succeeds.
  • 4000 0000 0000 0002: Visa, always declines.
  • 4000 0000 0000 3220: Visa, requires 3D Secure authentication.
  • 5555 5555 5555 4444: Mastercard, succeeds.
  • 3782 822463 10005: American Express, succeeds.

Use any future expiration date. Use any CVC. The postal code can be anything unless you test address verification.

How to trigger specific outcomes

Stripe ties outcomes to the card number. For example, 4000 0000 0000 0002 gives a generic decline. 4000 0000 0000 9995 gives an insufficient funds decline. You can also use special tokens for disputes and fraud checks. Check Stripe's docs for the full list. I keep a small set in my test suite and rotate them by scenario.

3D Secure and other authentication

Some test cards force a 3D Secure challenge. The card 4000 0000 0000 3220 always triggers it. You will see a fake authentication page. You can choose to pass or fail. That helps you test the redirect flow and the fallback when authentication fails.

Best practices

  1. Never use test cards in live mode. They will fail.
  2. Keep test keys separate from live keys.
  3. Log which test card triggered which error.
  4. Do not store test card numbers in production databases.

Test cards are a developer tool. Treat them as part of your test fixtures. They are not a way to bypass real payments.