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 as12/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_visainstead 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).
| Brand | Card number | PaymentMethod |
|---|---|---|
| Visa | 4242424242424242 | pm_card_visa |
| Visa (debit) | 4000056655665556 | pm_card_visa_debit |
| Mastercard | 5555555555554444 | pm_card_mastercard |
| Mastercard (2-series) | 2223003122003222 | — |
| Mastercard (debit) | 5200828282828210 | pm_card_mastercard_debit |
| Mastercard (prepaid) | 5105105105105100 | pm_card_mastercard_prepaid |
| American Express | 378282246310005 | pm_card_amex |
| American Express | 371449635398431 | pm_card_amex |
| Discover | 6011111111111117 | pm_card_discover |
| Discover (debit) | 6011981111111113 | — |
| Diners Club | 3056930009020004 | pm_card_diners |
| Diners Club (14-digit) | 36227206271667 | — |
| JCB | 3566002020360505 | pm_card_jcb |
| UnionPay | 6200000000000005 | pm_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.
| Scenario | Card number | PaymentMethod | Error code | Decline code |
|---|---|---|---|---|
| Generic decline | 4000000000000002 | pm_card_visa_chargeDeclined | card_declined | generic_decline |
| Insufficient funds | 4000000000009995 | pm_card_visa_chargeDeclinedInsufficientFunds | card_declined | insufficient_funds |
| Lost card | 4000000000009987 | pm_card_visa_chargeDeclinedLostCard | card_declined | lost_card |
| Stolen card | 4000000000009979 | pm_card_visa_chargeDeclinedStolenCard | card_declined | stolen_card |
| Expired card | 4000000000000069 | pm_card_chargeDeclinedExpiredCard | expired_card | — |
| Incorrect CVC | 4000000000000127 | pm_card_chargeDeclinedIncorrectCvc | incorrect_cvc | — |
| Processing error | 4000000000000119 | pm_card_chargeDeclinedProcessingError | processing_error | — |
| Incorrect number (fails Luhn) | 4242424242424241 | — | incorrect_number | — |
| Velocity limit exceeded | 4000000000006975 | pm_card_visa_chargeDeclinedVelocityLimitExceeded | card_declined | card_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 get | Enter |
|---|---|
invalid_expiry_month | A month that doesn't exist, such as 13 |
invalid_expiry_year | A year 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 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.
| Scenario | Card number | PaymentMethod | What happens |
|---|---|---|---|
| Authenticate unless set up | 4000002500003155 | pm_card_authenticationRequiredOnSetup | Off-session payments need authentication until the card is set up for future use; on-session payments always need it. |
| Always authenticate | 4000002760003184 | pm_card_authenticationRequired | Every transaction needs authentication, however the card was set up. |
| Already set up | 4000003800000446 | pm_card_authenticationRequiredSetupForOffSession | Off-session payments succeed as if set up; on-session payments need authentication. |
| Authenticates, then declines | 4000008260003178 | pm_card_authenticationRequiredChargeDeclinedInsufficientFunds | Needs authentication, then declines with insufficient_funds. |
| 3DS required | 4000000000003220 | pm_card_threeDSecure2Required | Payment succeeds only once 3DS is completed. |
| 3DS required, declined after | 4000008400001629 | pm_card_threeDSecureRequiredChargeDeclined | Authentication completes, then card_declined. |
| 3DS lookup error | 4000008400001280 | pm_card_threeDSecureRequiredProcessingError | The 3DS lookup fails and the payment is declined with card_declined. |
| 3DS supported, not required | 4000000000003055 | pm_card_threeDSecureOptional | 3DS may run but isn't required. |
| Frictionless 3DS | 4000000032200000 | — | Authentication is required and succeeds without a challenge. |
| 3DS not supported | 378282246310005 | pm_card_amex_threeDSecureNotSupported | 3DS 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.
| Scenario | Card number | PaymentMethod | Result |
|---|---|---|---|
| Always blocked | 4100000000000019 | pm_card_radarBlock | Risk level highest; Radar always blocks it. |
| Highest risk | 4000000000004954 | pm_card_riskLevelHighest | Risk level highest; blocked depending on your settings. |
| Elevated risk | 4000000000009235 | pm_card_riskLevelElevated | Risk level elevated; may be queued for review. |
| CVC check fails | 4000000000000101 | pm_card_cvcCheckFail | Fails the CVC check when a CVC is sent. |
| Postal code check fails | 4000000000000036 | pm_card_avsZipFail | Fails the postal code check when a postal code is sent. |
| Address line 1 check fails | 4000000000000028 | pm_card_avsLine1Fail | Succeeds unless a custom Radar rule blocks it. |
| Address checks fail | 4000000000000010 | pm_card_avsFail | Postal code and line 1 checks both fail. |
| Address unavailable | 4000000000000044 | pm_card_avsUnchecked | Both 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.
| Scenario | Card number | PaymentMethod | What happens |
|---|---|---|---|
| Fraudulent (asynchronous) | 4061219946393810 | — | A fraudulent dispute is created shortly after the payment, closest to live behaviour. |
| Fraudulent (synchronous) | 4000000000000259 | pm_card_createDispute | A fraudulent dispute is created during the payment request. |
| Product not received | 4000000000002685 | pm_card_createDisputeProductNotReceived | Disputed as product not received. |
| Inquiry | 4000000000001976 | pm_card_createDisputeInquiry | Disputed as an inquiry. |
| Early fraud warning | 4000000000005423 | pm_card_createIssuerFraudRecord | Receives an early fraud warning. |
| Multiple disputes | 4000000404000079 | pm_card_createMultipleDisputes | Disputed 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:
| Scenario | Card number | PaymentMethod | What happens |
|---|---|---|---|
| Refund pending, then succeeds | 4000000000007726 | pm_card_pendingRefund | Refund starts as pending, later moves to succeeded and sends refund.updated. |
| Refund succeeds, then fails | 4000000000005126 | pm_card_refundFail | Refund starts as succeeded, then after a few minutes moves to failed and sends refund.failed. |
| Bypass pending balance (US) | 4000000000000077 | pm_card_bypassPending | Funds go straight to your available balance. |
| Bypass pending balance (international) | 4000003720000278 | pm_card_bypassPendingInternational | Funds 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
429errors. 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
Related in Stripe Integration
- Testing Stripe Payment Failures and Decline Codes Systematically
Stripe's test cards let you catch payment failures before customers hit them.
- Stateful Stripe Integration Testing Without Live Credentials
A stateful local simulator tests payment flows without live credentials or network dependencies.
- Stripe Refund Workflows and Partial Refund Edge Cases
Stripe's refund model breaks down in partial refunds, API changes, and payment method rules.
- Stripe Webhook Signature Verification in Production
Protecting your webhook endpoint from forged events requires more than just signature checks.
- Stripe Subscription Lifecycle and Proration Handling
Stripe subscriptions are state machines where proration is a per-call choice, not automatic.