Stripe testing

Stripe test cards

Every Stripe test scenario you're likely to need, from 4242 4242 4242 4242 to the card that disputes itself. Search by brand, country or decline code, and copy a number with one click. Copied from Stripe's testing docs on 10 November 2026.

Use any future expiry date, such as 12/34, and any three-digit CVC (four digits for American Express). Any value works for the other fields. Use them with your test API keys.

Successful payments by card brand

BrandNumberCVC
Visa4242 4242 4242 4242Any 3 digits
Visa (debit)4000 0566 5566 5556Any 3 digits
Mastercard5555 5555 5555 4444Any 3 digits
Mastercard (2-series)2223 0031 2200 3222Any 3 digits
Mastercard (debit)5200 8282 8282 8210Any 3 digits
Mastercard (prepaid)5105 1051 0510 5100Any 3 digits
American Express3782 822463 10005Any 4 digits
American Express3714 496353 98431Any 4 digits
Discover6011 1111 1111 1117Any 3 digits
Discover6011 0009 9013 9424Any 3 digits
Discover (debit)6011 9811 1111 1113Any 3 digits
Diners Club3056 9300 0902 0004Any 3 digits
Diners Club (14-digit card)3622 720627 1667Any 3 digits
BCcard and DinaCard6555 9000 0060 4105Any 3 digits
JCB3566 0020 2036 0505Any 3 digits
UnionPay6200 0000 0000 0005Any 3 digits
UnionPay (debit)6200 0000 0000 0047Any 3 digits
UnionPay (19-digit card)6205 5000 0000 0000 004Any 3 digits
Cartes Bancaires/Visa4000 0025 0000 1001Any 3 digits
Cartes Bancaires/Mastercard5555 5525 0000 1001Any 3 digits
eftpos Australia/Visa4000 0503 6000 0001Any 3 digits
eftpos Australia/Mastercard5555 0503 6000 0080Any 3 digits

Declined payments

ScenarioNumberError code / decline code
Generic decline4000 0000 0000 0002card_declined / generic_decline
Insufficient funds4000 0000 0000 9995card_declined / insufficient_funds
Lost card4000 0000 0000 9987card_declined / lost_card
Stolen card4000 0000 0000 9979card_declined / stolen_card
Expired card4000 0000 0000 0069expired_card
Incorrect CVC4000 0000 0000 0127incorrect_cvc
Processing error4000 0000 0000 0119processing_error
Incorrect number (fails the Luhn check)4242 4242 4242 4241incorrect_number
Exceeding velocity limit4000 0000 0000 6975card_declined / card_velocity_exceeded
Decline after attaching4000 0000 0000 0341Attaching to a Customer succeeds; charging the customer fails

Radar and fraud checks

ScenarioNumberWhat happens
Always blocked4100 0000 0000 0019Risk level highest. Radar always blocks it
Highest risk4000 0000 0000 4954Risk level highest. Radar might block it, depending on your settings
Elevated risk4000 0000 0000 9235Risk level elevated. Radar might queue it for review
CVC check fails4000 0000 0000 0101If you provide a CVC, the CVC check fails
Postal code check fails4000 0000 0000 0036If you provide a postal code, the postal code check fails

3D Secure authentication

ScenarioNumberWhat happens
Authenticate unless set up4000 0025 0000 3155Off-session payments need authentication unless the card was set up
Always authenticate4000 0027 6000 3184Authentication on every transaction, however the card was set up
Already set up4000 0038 0000 0446One-time and on-session payments need authentication; off-session payments succeed
Insufficient funds after authentication4000 0082 6000 3178Needs authentication, then declines insufficient_funds
3DS required, succeeds (Ireland-issued)4000 0000 0000 3220Authentication must complete for the payment to succeed
3DS required, succeeds (US-issued)4000 0084 0000 0027Authentication must complete for the payment to succeed
3DS required, declined4000 0084 0000 1629Authentication required, then declined card_declined
3DS supported, not required4000 0000 0000 3055Authentication might run but isn't required
3DS not supported3782 822463 100053DS can't be invoked on this card
Frictionless flow4000 0000 3220 0000Authenticates without a challenge and succeeds

Disputes and early fraud warnings

ScenarioNumberWhat happens
Fraudulent, asynchronous4061 2199 4639 3810Succeeds, then a fraudulent dispute shortly after. Stripe's pick for most tests
Fraudulent, synchronous4000 0000 0000 0259Succeeds, with a fraudulent dispute during the request
Product not received4000 0000 0000 2685Succeeds, then disputed as product not received
Inquiry4000 0000 0000 1976Succeeds, then disputed as an inquiry
Early fraud warning4000 0000 0000 5423Succeeds, then receives an early fraud warning
Multiple disputes4000 0004 0400 0079Succeeds, then disputed multiple times

Refunds

ScenarioNumberWhat happens
Asynchronous refund success4000 0000 0000 7726Refund starts pending, then succeeds refund.updated
Asynchronous refund failure4000 0000 0000 5126Refund starts succeeded, then fails after a few minutes refund.failed

Cards by country

CountryNumberBrandRegion
United States (US)4242 4242 4242 4242VisaAmericas
Argentina (AR)4000 0003 2000 0021VisaAmericas
Brazil (BR)4000 0007 6000 0002VisaAmericas
Canada (CA)4000 0012 4000 0000VisaAmericas
Chile (CL)4000 0015 2000 0001VisaAmericas
Colombia (CO)4000 0017 0000 0003VisaAmericas
Costa Rica (CR)4000 0018 8000 0005VisaAmericas
Ecuador (EC)4000 0021 8000 0000VisaAmericas
Mexico (MX)4000 0048 4000 8001VisaAmericas
Mexico (MX)5062 2100 0000 0009CarnetAmericas
Panama (PA)4000 0059 1000 0000VisaAmericas
Paraguay (PY)4000 0060 0000 0066VisaAmericas
Peru (PE)4000 0060 4000 0068VisaAmericas
Uruguay (UY)4000 0085 8000 0003VisaAmericas
United Arab Emirates (AE)4000 0078 4000 0001VisaEurope and Middle East
United Arab Emirates (AE)5200 0078 4000 0022MastercardEurope and Middle East
Austria (AT)4000 0004 0000 0008VisaEurope and Middle East
Belgium (BE)4000 0005 6000 0004VisaEurope and Middle East
Bulgaria (BG)4000 0010 0000 0000VisaEurope and Middle East
Belarus (BY)4000 0011 2000 0005VisaEurope and Middle East
Croatia (HR)4000 0019 1000 0009VisaEurope and Middle East
Cyprus (CY)4000 0019 6000 0008VisaEurope and Middle East
Czech Republic (CZ)4000 0020 3000 0002VisaEurope and Middle East
Denmark (DK)4000 0020 8000 0001VisaEurope and Middle East
Estonia (EE)4000 0023 3000 0009VisaEurope and Middle East
Finland (FI)4000 0024 6000 0001VisaEurope and Middle East
France (FR)4000 0025 0000 0003VisaEurope and Middle East
Germany (DE)4000 0027 6000 0016VisaEurope and Middle East
Gibraltar (GI)4000 0029 2000 0005VisaEurope and Middle East
Greece (GR)4000 0030 0000 0030VisaEurope and Middle East
Hungary (HU)4000 0034 8000 0005VisaEurope and Middle East
Ireland (IE)4000 0037 2000 0005VisaEurope and Middle East
Italy (IT)4000 0038 0000 0008VisaEurope and Middle East
Latvia (LV)4000 0042 8000 0005VisaEurope and Middle East
Liechtenstein (LI)4000 0043 8000 0004VisaEurope and Middle East
Lithuania (LT)4000 0044 0000 0000VisaEurope and Middle East
Luxembourg (LU)4000 0044 2000 0006VisaEurope and Middle East
Malta (MT)4000 0047 0000 0007VisaEurope and Middle East
Netherlands (NL)4000 0052 8000 0002VisaEurope and Middle East
Norway (NO)4000 0057 8000 0007VisaEurope and Middle East
Poland (PL)4000 0061 6000 0005VisaEurope and Middle East
Portugal (PT)4000 0062 0000 0007VisaEurope and Middle East
Romania (RO)4000 0064 2000 0001VisaEurope and Middle East
Saudi Arabia (SA)4000 0068 2000 0007VisaEurope and Middle East
Slovenia (SI)4000 0070 5000 0006VisaEurope and Middle East
Slovakia (SK)4000 0070 3000 0001VisaEurope and Middle East
Spain (ES)4000 0072 4000 0007VisaEurope and Middle East
Sweden (SE)4000 0075 2000 0008VisaEurope and Middle East
Switzerland (CH)4000 0075 6000 0009VisaEurope and Middle East
United Kingdom (GB)4000 0082 6000 0000VisaEurope and Middle East
United Kingdom (GB)4000 0582 6000 0005Visa (debit)Europe and Middle East
United Kingdom (GB)5555 5582 6555 4449MastercardEurope and Middle East
Australia (AU)4000 0003 6000 0006VisaAsia Pacific
China (CN)4000 0015 6000 0002VisaAsia Pacific
Hong Kong (HK)4000 0034 4000 0004VisaAsia Pacific
India (IN)4000 0035 6000 0008VisaAsia Pacific
Japan (JP)4000 0039 2000 0003VisaAsia Pacific
Japan (JP)3530 1113 3330 0000JCBAsia Pacific
Malaysia (MY)4000 0045 8000 0002VisaAsia Pacific
New Zealand (NZ)4000 0055 4000 0008VisaAsia Pacific
Singapore (SG)4000 0070 2000 0003VisaAsia Pacific
Taiwan (TW)4000 0015 8000 0008VisaAsia Pacific
Thailand (TH)4000 0076 4000 0003Visa (credit)Asia Pacific
Thailand (TH)4000 0576 4000 0008Visa (debit)Asia Pacific

How to use these cards

Switch your Stripe integration to test mode with your test API keys, then type any number above into Checkout, the Payment Element or the Dashboard. Stripe's instructions are short: a valid future expiry date, any three-digit CVC (four for American Express), any value in the other fields. The number decides what happens.

Use them with your test API keys. The Stripe Services Agreement prohibits testing in live mode with real card details, so testing in live mode means a few small real charges that you refund afterwards. More on that below.

Card numbers in code

In automated tests, use a test PaymentMethod ID such as pm_card_visa, not the raw number. Stripe's own guidance is not to put card numbers in API calls or server-side code, even in testing, because code that sends raw numbers might not be PCI compliant when it goes live. The numbers on this page are for typing into a form.

One trap: you can't attach a card that simulates an issuer decline to a Customer. To test a saved card that fails later, attach 4000 0000 0000 0341, which attaches cleanly and declines when you charge it. That's the card for testing renewals and dunning.

What to test before launch

At minimum, run one card from each of these through your real checkout and watch what your code does:

  1. A success (4242 4242 4242 4242) all the way to fulfilment, including the webhook.
  2. A generic decline and insufficient funds. The customer should see a message they can act on, and your order should not be marked paid.
  3. 3D Secure required. The payment pauses for authentication and your code has to resume it. If you sell in Europe, this is the path most customers take; SCA exemptions and 3DS2 explains when it's skipped.
  4. A dispute. Check that the charge.dispute.created event reaches you and that someone finds out.
  5. The same webhook twice. Not a card, but test it anyway; duplicate Stripe webhooks shows why.

What test mode won't tell you

Radar scores test cards differently from real ones, real issuers run their own 3D Secure challenge screens, payout timing is simulated, and test-mode webhooks stop retrying much sooner than live ones. Before launch, run a few small live charges on your own card, follow them through the webhook into your database, then refund them. The free Stripe chapter covers the CLI loop for replaying events locally.

Source

Every number on this page is copied from Stripe's testing documentation, checked 10 November 2026. This is a selection: Stripe also lists HSA and FSA cards, more Radar and dispute-prevention cards, mobile 3DS challenge flows, captcha and in-person PIN cards, and bank account numbers for ACH, Bacs and BECS. If a number here stops behaving as described, Stripe's page wins.

Questions

What is the Stripe test card number?

4242 4242 4242 4242 is the standard Visa test card. It succeeds with any future expiry date and any three-digit CVC, with your test API keys.

Which Stripe test card declines a payment?

4000 0000 0000 0002 returns a generic decline. 4000 0000 0000 9995 declines for insufficient funds, 4000 0000 0000 0069 as an expired card, and 4000 0000 0000 0127 for an incorrect CVC.

Which Stripe test card requires 3D Secure?

4000 0025 0000 3155 requires authentication unless the card was set up for off-session use. 4000 0027 6000 3184 requires it on every transaction.

Can I use Stripe test cards in live mode?

No. Use them with your test API keys. The Stripe Services Agreement prohibits testing in live mode with real card details, so a live test means a few small real charges that you refund afterwards.

What the book adds

What chapter 9 adds

  • The Stripe CLI loop: listen, trigger and replay events locally
  • Payment Intents and 3D Secure handling end to end
  • A webhook handler with signature verification and idempotency
  • Subscriptions, dunning and test clocks
  • The production checklist to run before you flip to live keys

30-day money-back · Instant PDF and EPUB

All 42 chapters