Reference guide

Stripe Test Cards: Every Test Card Number by Scenario

The card numbers and PaymentMethod IDs Stripe gives you for sandbox testing, grouped by what you are trying to make happen, with the error and decline codes your integration should expect back.

Checked against Stripe’s testing documentation on . Stripe adds and retires test cards; confirm a number there before you depend on it.

How to use Stripe test cards

Test cards only work with your test API keys in a Stripe sandbox, and no money moves. Use them in two ways:

  • In a payment form (Checkout, Elements, the Dashboard): type a card number such as 4242 4242 4242 4242, any future expiry date such as 12/34, any three-digit CVC (four digits for American Express), and any value for the other fields.
  • In test code and API calls: pass a test PaymentMethod such as pm_card_visa instead of a raw number. Stripe recommends this because code that sends card numbers to your server may not be PCI compliant once it goes live.
Never test with real card details. Stripe's Services Agreement prohibits testing in live mode with real payment methods, so every scenario below belongs in a sandbox with test keys.

Card-level state carries over between tests that reuse the same card. When a test depends on that state (a saved card, a dispute, a refund in flight), give each independent end-to-end scenario its own test card.

Successful payments by card brand

Each of these succeeds. Use any future expiry date and any CVC (three digits, or four for American Express).

BrandCard numberPaymentMethod
Visa4242424242424242pm_card_visa
Visa (debit)4000056655665556pm_card_visa_debit
Mastercard5555555555554444pm_card_mastercard
Mastercard (2-series)2223003122003222—
Mastercard (debit)5200828282828210pm_card_mastercard_debit
Mastercard (prepaid)5105105105105100pm_card_mastercard_prepaid
American Express378282246310005pm_card_amex
American Express371449635398431pm_card_amex
Discover6011111111111117pm_card_discover
Discover (debit)6011981111111113—
Diners Club3056930009020004pm_card_diners
Diners Club (14-digit)36227206271667—
JCB3566002020360505pm_card_jcb
UnionPay6200000000000005pm_card_unionpay
UnionPay (19-digit)6205500000000000004—

Stripe also lists a card per issuing country (for example 4000008260000000 for a UK Visa, pm_card_gb, or 4000002760000016 for a German Visa, pm_card_de). European cards in that list succeed without authentication, so pair them with the 3D Secure cards below when you test Strong Customer Authentication. The full country list is on Stripe's testing page.

Declined payments and decline codes

These return a card error with the error code and decline code shown, which is what your error handling and customer-facing messages should branch on.

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 number (fails Luhn)4242424242424241—incorrect_number—
Velocity limit exceeded4000000000006975pm_card_visa_chargeDeclinedVelocityLimitExceededcard_declinedcard_velocity_exceeded

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

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

Errors from invalid card data

Validation errors need no special card. Enter a bad value with any test card:

To getEnter
invalid_expiry_monthA month that doesn't exist, such as 13
invalid_expiry_yearA year in the past, such as 95
invalid_cvcA two-digit CVC, such as 99
incorrect_numberA number that fails the Luhn check, such as 4242424242424241

3D Secure and authentication test cards

Only these cards exercise defined 3D Secure behaviour. Other test cards may still trigger 3DS, but Stripe bypasses the extra steps for them. 3DS redirects don't happen for payments created in the Dashboard, so test them through your own front end or the API.

ScenarioCard numberPaymentMethodWhat happens
Authenticate unless set up4000002500003155pm_card_authenticationRequiredOnSetupOff-session payments need authentication until the card is set up for future use; on-session payments always need it.
Always authenticate4000002760003184pm_card_authenticationRequiredEvery transaction needs authentication, however the card was set up.
Already set up4000003800000446pm_card_authenticationRequiredSetupForOffSessionOff-session payments succeed as if set up; on-session payments need authentication.
Authenticates, then declines4000008260003178pm_card_authenticationRequiredChargeDeclinedInsufficientFundsNeeds authentication, then declines with insufficient_funds.
3DS required4000000000003220pm_card_threeDSecure2RequiredPayment succeeds only once 3DS is completed.
3DS required, declined after4000008400001629pm_card_threeDSecureRequiredChargeDeclinedAuthentication completes, then card_declined.
3DS lookup error4000008400001280pm_card_threeDSecureRequiredProcessingErrorThe 3DS lookup fails and the payment is declined with card_declined.
3DS supported, not required4000000000003055pm_card_threeDSecureOptional3DS may run but isn't required.
Frictionless 3DS4000000032200000—Authentication is required and succeeds without a challenge.
3DS not supported378282246310005pm_card_amex_threeDSecureNotSupported3DS can't run; the payment proceeds without it.

Stripe also has cards for specific mobile challenge screens (out-of-band, one-time passcode, single and multi select), listed on its testing page. They only change behaviour inside mobile SDK flows.

Radar and fraud test cards

Each card carries a risk signal; whether the payment is blocked depends on your Radar settings. A blocked payment returns a card error with the code fraud.

ScenarioCard numberPaymentMethodResult
Always blocked4100000000000019pm_card_radarBlockRisk level highest; Radar always blocks it.
Highest risk4000000000004954pm_card_riskLevelHighestRisk level highest; blocked depending on your settings.
Elevated risk4000000000009235pm_card_riskLevelElevatedRisk level elevated; may be queued for review.
CVC check fails4000000000000101pm_card_cvcCheckFailFails the CVC check when a CVC is sent.
Postal code check fails4000000000000036pm_card_avsZipFailFails the postal code check when a postal code is sent.
Address line 1 check fails4000000000000028pm_card_avsLine1FailSucceeds unless a custom Radar rule blocks it.
Address checks fail4000000000000010pm_card_avsFailPostal code and line 1 checks both fail.
Address unavailable4000000000000044pm_card_avsUncheckedBoth address checks unavailable; succeeds unless a rule blocks it.

Dispute and early fraud warning test cards

With default account settings these payments succeed and a dispute follows, so you can test your charge.dispute.* webhook handling end to end.

ScenarioCard numberPaymentMethodWhat happens
Fraudulent (asynchronous)4061219946393810—A fraudulent dispute is created shortly after the payment, closest to live behaviour.
Fraudulent (synchronous)4000000000000259pm_card_createDisputeA fraudulent dispute is created during the payment request.
Product not received4000000000002685pm_card_createDisputeProductNotReceivedDisputed as product not received.
Inquiry4000000000001976pm_card_createDisputeInquiryDisputed as an inquiry.
Early fraud warning4000000000005423pm_card_createIssuerFraudRecordReceives an early fraud warning.
Multiple disputes4000000404000079pm_card_createMultipleDisputesDisputed more than once.

To close a test dispute, submit evidence with the text winning_evidence (won) or losing_evidence (lost) in the API's uncategorized_text field or the Dashboard's Additional information field. For an inquiry, escalate_inquiry_evidence turns it into a full chargeback.

Refund and balance test cards

Refunds on every other test card succeed immediately and never change status. Live refunds are asynchronous, so test the slow and failing paths with these:

ScenarioCard numberPaymentMethodWhat happens
Refund pending, then succeeds4000000000007726pm_card_pendingRefundRefund starts as pending, later moves to succeeded and sends refund.updated.
Refund succeeds, then fails4000000000005126pm_card_refundFailRefund starts as succeeded, then after a few minutes moves to failed and sends refund.failed.
Bypass pending balance (US)4000000000000077pm_card_bypassPendingFunds go straight to your available balance.
Bypass pending balance (international)4000003720000278pm_card_bypassPendingInternationalFunds go straight to your available balance.

Use the bypass cards when a test needs available funds right away, such as a Connect transfer or payout after a test charge.

What test cards don't cover

A test card decides how one payment ends. It doesn't hold the rest of your system in a known state, and a sandbox carries some limits of its own:

  • Sandbox rate limits are stricter than live mode, so a burst of test traffic can return 429 errors. Stripe says not to load test against a sandbox.
  • State builds up across runs: customers, saved cards, disputes and refunds from one test can change the next unless each scenario uses its own card and data.
  • Webhooks arrive on Stripe's schedule. To test your handlers, trigger real events with test cards or send them with the Stripe CLI (stripe trigger), and make your handlers safe to receive the same event twice.

For multi-step flows (authorise, capture, refund, dispute) that have to replay identically in CI, see the guides to stateful Stripe integration testing without live credentials and testing payment failures and decline codes systematically.

Testing PayPal or Adyen as well? Their test card numbers and decline triggers are in PayPal test cards and Adyen test cards.

Frequently asked questions

What is the Stripe test card number?

The standard one is 4242 4242 4242 4242, a Visa that always succeeds. Use any future expiry date, any three-digit CVC and any postal code. In code, use the PaymentMethod pm_card_visa.

What expiry date and CVC do Stripe test cards use?

Any valid future date (for example 12/34) and any three-digit CVC, or four digits for American Express. To test a CVC failure, use the incorrect CVC card 4000000000000127 and send a CVC.

Do Stripe test cards work in live mode?

No. Test cards only work with test API keys in a sandbox. Stripe's Services Agreement also prohibits testing in live mode with real card details.

How do I test a declined payment in Stripe?

Use 4000000000000002 for a generic decline, or a card for a specific reason such as 4000000000009995 for insufficient_funds. The full list is in the declined payments table above.

Which Stripe test card triggers 3D Secure?

4000002760003184 requires authentication on every payment, and 4000002500003155 requires it unless the card has been set up for future use. Test them through your own front end or the API, not the Dashboard.

Sources

  1. Stripe: Testing
  2. Stripe: Error codes
  3. Stripe: Decline codes
  4. Stripe: Test your Billing integration