Est.

Reference guide

Stripe test cards: every number by the scenario it simulates

Stripe test card numbers grouped by what they simulate (successful payments, declines and their error codes, 3D Secure, Radar, disputes and refunds), with the PaymentMethod ID to use in test code.

Checked against Stripe’s documentation on

The short answer

Use 4242 4242 4242 4242 with any future expiry date (such as 12/34), any three-digit CVC (four digits for American Express) and any value in the other fields. Test cards only work with your test API keys, in a sandbox; never test live mode with real card details.

In test code, pass a PaymentMethod ID such as pm_card_visa instead of a raw card number. Stripe recommends it, because sending card numbers from server-side code can make that code fall out of PCI compliance when it goes live.

Successful payments by card brand

Each of these succeeds without authentication. Cards issued outside the US (JCB and UnionPay among them) can be charged a cross-border fee even in a sandbox.

BrandCard numberPaymentMethodCVC
Visa4242424242424242pm_card_visaAny 3 digits
Visa (debit)4000056655665556pm_card_visa_debitAny 3 digits
Mastercard5555555555554444pm_card_mastercardAny 3 digits
Mastercard (2-series)2223003122003222—Any 3 digits
Mastercard (debit)5200828282828210pm_card_mastercard_debitAny 3 digits
Mastercard (prepaid)5105105105105100pm_card_mastercard_prepaidAny 3 digits
American Express378282246310005pm_card_amexAny 4 digits
American Express371449635398431—Any 4 digits
Discover6011111111111117pm_card_discoverAny 3 digits
Discover (debit)6011981111111113—Any 3 digits
Diners Club3056930009020004pm_card_dinersAny 3 digits
Diners Club (14-digit)36227206271667—Any 3 digits
JCB3566002020360505pm_card_jcbAny 3 digits
UnionPay6200000000000005pm_card_unionpayAny 3 digits
UnionPay (19-digit)6205500000000000004—Any 3 digits

Tokens such as tok_visa and tok_mastercard are still available if an older integration needs them, but most integrations no longer use tokens.

Declined payments and their error codes

These cards return a card error with the listed error code and, where there is one, a decline code. Assert on both in your error handling: the decline code is what tells you whether to ask the customer for another card.

ScenarioCard numberPaymentMethodError codeDecline code
Generic decline4000000000000002pm_card_visa_chargeDeclinedcard_declinedgeneric_decline
Insufficient funds4000000000009995pm_card_visa_chargeDeclinedInsufficientFundscard_declinedinsufficient_funds
Lost card4000000000009987pm_card_visa_chargeDeclinedLostCardcard_declinedlost_card
Stolen card4000000000009979pm_card_visa_chargeDeclinedStolenCardcard_declinedstolen_card
Expired card4000000000000069pm_card_chargeDeclinedExpiredCardexpired_card—
Incorrect CVC4000000000000127pm_card_chargeDeclinedIncorrectCvcincorrect_cvc—
Processing error4000000000000119pm_card_chargeDeclinedProcessingErrorprocessing_error—
Incorrect number4242424242424241—incorrect_number—
Velocity limit exceeded4000000000006975pm_card_visa_chargeDeclinedVelocityLimitExceededcard_declinedcard_velocity_exceeded

Cards that simulate an issuer decline can't be attached to a Customer. To test a saved card that fails when you charge it later (a renewal, say), use 4000000000000341 or pm_card_chargeCustomerFail: attaching it succeeds, charging it fails.

Send a CVC when you test CVC handling. If you leave it out, Stripe skips the check and it can't fail.

Errors from invalid data

No special card is needed for validation errors. Enter an invalid value with any test card:

  • invalid_expiry_month: a month such as 13.
  • invalid_expiry_year: a year up to 50 years in the past, such as 95.
  • invalid_cvc: a two-digit CVC, such as 99.
  • incorrect_number: a number that fails the Luhn check, such as 4242424242424241.

3D Secure and authentication

Only these cards test defined 3D Secure behaviour. Other test cards can still trigger 3DS, but Stripe returns attempt_acknowledged and skips the extra steps. Payments created in the Stripe Dashboard never redirect for 3DS, so test these through your own front end or the API.

ScenarioCard numberPaymentMethod
Authenticate unless set up for off-session use4000002500003155pm_card_authenticationRequiredOnSetup
Always authenticate4000002760003184pm_card_authenticationRequired
Already set up for off-session use4000003800000446pm_card_authenticationRequiredSetupForOffSession
Authenticates, then declines with insufficient_funds4000008260003178pm_card_authenticationRequiredChargeDeclinedInsufficientFunds
3DS required, succeeds4000000000003220pm_card_threeDSecure2Required
3DS required, declined after authentication4000008400001629pm_card_threeDSecureRequiredChargeDeclined
3DS required, lookup fails with a processing error4000008400001280pm_card_threeDSecureRequiredProcessingError
3DS supported but not required4000000000003055pm_card_threeDSecureOptional
3DS not supported (proceeds without authentication)378282246310005pm_card_amex_threeDSecureNotSupported
Frictionless flow, succeeds4000000032200000—

The off-session cards matter most for subscriptions and saved cards: a renewal charged while the customer is away fails if the card needs authentication, and your integration has to bring them back to complete it.

Fraud checks and Radar

Blocked payments come back as card errors with the error code fraud. Whether a card is blocked depends on your Radar settings, except the first, which is always blocked. Include a CVC or postal code to make those checks fail; leave them out and Radar skips them.

ScenarioCard numberPaymentMethod
Always blocked4100000000000019pm_card_radarBlock
Highest risk4000000000004954pm_card_riskLevelHighest
Elevated risk (may be queued for review)4000000000009235pm_card_riskLevelElevated
CVC check fails4000000000000101pm_card_cvcCheckFail
Postal code check fails4000000000000036pm_card_avsZipFail
Address line 1 check fails4000000000000028pm_card_avsLine1Fail
Postal code and line 1 checks fail4000000000000010pm_card_avsFail

Disputes and early fraud warnings

These payments succeed, then turn into a dispute or warning, which is what your webhook handlers need to see.

ScenarioCard numberPaymentMethod
Fraudulent, created shortly after payment (closest to live)4061219946393810—
Fraudulent, created during the payment request4000000000000259pm_card_createDispute
Product not received4000000000002685pm_card_createDisputeProductNotReceived
Inquiry4000000000001976pm_card_createDisputeInquiry
Early fraud warning4000000000005423pm_card_createIssuerFraudRecord
Multiple disputes4000000404000079pm_card_createMultipleDisputes

To settle a test dispute, submit winning_evidence or losing_evidence as the uncategorized text of your evidence (via the API, or the Additional information field in the Dashboard). For an inquiry, escalate_inquiry_evidence turns it into a full dispute.

Asynchronous refunds and available balance

With most test cards a refund succeeds at once and never changes. Live refunds don't behave that way, so test the two that do:

ScenarioCard numberPaymentMethod
Refund starts pending, later succeeds (refund.updated)4000000000007726pm_card_pendingRefund
Refund starts succeeded, later fails (refund.failed)4000000000005126pm_card_refundFail
Funds skip pending balance (US)4000000000000077pm_card_bypassPending
Funds skip pending balance (international)4000003720000278pm_card_bypassPendingInternational

The bypass-pending cards are useful when a test needs an available balance, for example to create a payout or a Connect transfer straight after the charge.

Cards by country

Each country card succeeds without authentication and has a matching pm_card_<country code> PaymentMethod (for example pm_card_gb). European cards skip the 3D Secure that Strong Customer Authentication would require in live mode, so pair them with the 3DS cards above. A few common ones:

CountryCard numberPaymentMethod
United States4242424242424242pm_card_us
Canada4000001240000000pm_card_ca
Brazil4000000760000002pm_card_br
Mexico4000004840008001pm_card_mx
United Kingdom4000008260000000pm_card_gb
Germany4000002760000016pm_card_de
France4000002500000003pm_card_fr
India4000003560000008pm_card_in
Japan4000003920000003pm_card_jp
Australia4000000360000006pm_card_au

For every other country, see the full list in Stripe's testing docs.

What test cards can't tell you

A test card sets the outcome of one charge. Most payment bugs live between charges: in the webhook that arrives late, the retry that runs twice, the subscription that renews a month later. A few things to plan for:

  • State carries over. Stripe notes that card-level state from one test can affect later tests that use the same card. Give each independent end-to-end scenario its own card, and reset between runs (see eliminating state pollution between test runs).
  • Webhooks need a real event. Trigger them by doing the action in a sandbox (a successful test card produces charge.succeeded) or with the Stripe CLI's stripe trigger. Fulfil orders from the webhook, not the redirect; our Stripe testing guide walks through why.
  • The sandbox rate limiter is stricter than live. If CI gets 429 responses, slow down; Stripe says not to load test against test mode at all.
  • Time-based flows need test clocks. Renewals, trials and dunning only happen as time passes; Stripe's Billing testing docs cover test clocks.
  • Stateless mocks miss the sequence. A mock that returns a fixed PaymentIntent can't show that the confirm step depends on the intent you created. A stateful simulator keeps those objects between calls, so CI can run the whole flow offline.

Sources

Stripe adds and changes test values; check its documentation for the current list before you rely on a number here.

Go deeper