Stripe provides fake card numbers you can use to test payments without charging real money

When you're building a payment system or testing how your website handles credit card transactions, you need cards that won't actually process charges. Stripe, a payment processor used by millions of online businesses, publishes a set of test card numbers — fake numbers that trigger specific responses in their testing environment. You use these numbers in Stripe's test mode to see how your system behaves when a payment succeeds, fails, or requires extra verification.

Test cards work only in Stripe's test environment, never in live mode where real money moves. This means you can run thousands of test transactions without risk, and without needing permission from Stripe or a bank. The test numbers are public — Stripe publishes them openly — because they're useless outside of testing.

Key Takeaways

  • Stripe's test card numbers are fake numbers that only work in test mode and never charge real money.
  • Different test card numbers trigger different outcomes: some simulate successful payments, others simulate declines or fraud blocks.
  • You must be in Stripe's test mode to use these numbers; they will not work in live mode.
  • The most common test card is 4242 4242 4242 4242, which simulates a successful payment with any future expiration date and any three-digit CVC.

The most common test card numbers and what they simulate

Stripe publishes test card numbers for Visa, Mastercard, American Express, and Discover. The number you choose determines what happens when you try to process it. Here are the ones you'll use most often:

4242 4242 4242 4242 (Visa) simulates a successful payment. Use this when you want to confirm your checkout flow works end-to-end. You can pair it with any expiration date in the future and any three-digit CVC (the security code on the back).

4000 0000 0000 0002 (Visa) simulates a card decline. This tests whether your system shows an error message correctly when a payment fails. The decline happens at the payment processor level, not because the card is expired or the CVC is wrong.

5555 5555 5555 4444 (Mastercard) simulates a successful payment, just like the first Visa number. It's useful if you want to test that your system handles multiple card brands the same way.

378282246310005 (American Express) simulates a successful payment. Note that American Express numbers are 15 digits, not 16. The CVC for Amex test cards is four digits instead of three.

For any test card, the expiration date can be any date in the future, and the CVC can be any number of the correct length. Stripe ignores these fields during testing — it only looks at the card number itself to decide what outcome to simulate.

Test cards that simulate specific payment problems

Beyond straightforward success and decline, Stripe publishes test numbers that simulate the specific problems your system might encounter in real life. These let you test how your code handles edge cases without waiting for a real customer to hit them.

4000 0025 0000 3155 (Visa) requires 3D find authentication — a second verification step that some cards demand for security. If your checkout doesn't handle 3D find, this card will show you the problem when ready.

4000 0000 0000 0077 (Visa) simulates an incorrect CVC. The payment fails because the security code doesn't match, even though the card number itself is valid. This tests whether your error messages distinguish between different types of card problems.

4000 0000 0000 0010 (Visa) simulates an expired card. The payment fails because the expiration date has passed.

Stripe's full list of test cards includes numbers for processing fees, lost cards, stolen cards, and other scenarios. You can find the complete list in Stripe's documentation under "Testing" — search for "test card numbers" on Stripe's website.

How to use test card numbers in Stripe's test mode

Before you can use test cards, you need to be in Stripe's test mode, not live mode. In your Stripe dashboard, look for a toggle in the top left that says "Test mode" or "Live mode." Make sure it's set to Test mode.

When you're building your checkout form or payment page, you'll have fields for card number, expiration date, and CVC. Enter the test card number in the card number field, any future date in the expiration field, and any valid CVC in the security code field. Then submit the form as you normally would.

Stripe will process the test transaction when ready and return a result based on which test card you used. If you used 4242 4242 4242 4242, the payment will succeed and you'll see a success message. If you used 4000 0000 0000 0002, the payment will decline and you'll see a decline error.

Every test transaction appears in your Stripe dashboard under the Payments section, just like a real transaction would. You can inspect the details, see what data your system sent, and confirm that Stripe received it correctly. This is how you verify that your integration is working before you go live.

Why test cards matter before going live

Running test transactions with fake card numbers before you launch your payment system protects you in two ways. First, it catches bugs in your code — problems with how you're sending data to Stripe, how you're handling responses, or how you're displaying errors to customers. Second, it lets you see the customer experience from start to finish without risking real money.

If you skip testing and go straight to live mode, the first time someone tries to pay, you'll discover problems in real time while a real customer is waiting. They might see a broken error message, or their payment might fail silently with no explanation. Testing with fake cards prevents this.

The other reason to test is compliance. If you're handling card data, you need to follow PCI DSS (Payment Card Industry Data Security Standard) rules. Testing with real card numbers, even test ones from your own bank, violates these rules. Stripe's published test numbers exist specifically so you can test without touching real card data.

Test mode versus live mode: the critical difference

Stripe's test mode and live mode are completely separate. A test card number will never work in live mode, and a real card number will never work in test mode. This separation is intentional — it's a safety feature that prevents you from accidentally charging real money during development.

When you're ready to go live, you switch your API keys from test keys to live keys. Your code doesn't change, but Stripe starts processing real transactions against real bank accounts. At that point, test card numbers stop working entirely.

Many developers keep both test and live dashboards open side by side during development and launch. They test in test mode with fake cards, verify everything works, then switch to live mode with real cards. This workflow prevents mistakes.

Frequently Asked Questions

Can I use test card numbers in live mode?

No. Test card numbers only work in test mode. If you try to use one in live mode, Stripe will decline it as an invalid card number. This is a safety feature — it prevents you from accidentally using a fake card in production.

Do test transactions show up on my Stripe bill?

No. Test transactions don't count toward your processing volume and don't incur fees. They're completely free and exist only in your test dashboard.

What expiration date and CVC should I use with test cards?

Any future expiration date and any CVC of the correct length will work. For Visa, Mastercard, and Discover, use a three-digit CVC. For American Express, use four digits. Stripe ignores these fields during testing — only the card number matters.

Can I use a real card number to test my payment system?

You should not. Using real card numbers, even your own, violates PCI compliance rules and creates unnecessary risk. Stripe's test cards exist specifically so you can test without real card data.

Where do I find the complete list of Stripe test cards?

Stripe publishes the full list in their API documentation under "Testing." Search for "test card numbers" on Stripe's website, or look in the section titled "Testing your integration." The list includes cards for specific scenarios like 3D find, incorrect CVC, and expired cards.