Skip to main content

Stripe Sandbox Test Cards

Official test cards for Stripe Payments API, Stripe Elements, and Checkout test mode. Use these verified values to simulate successful payments, declines, and 3D Secure authentication.

Official Stripe Docs
Developer Notice: Stripe test cards are intended only for Stripe's designated test environment. They do not represent real financial accounts and are not intended for live payment authorization.
Source: Official Stripe testing documentation · Last verified against Stripe documentation: 29 September 2026
Verification methodology →
Need synthetic test numbers for frontend form validation? See our Test Credit Card Numbers guide to understand the difference between synthetic QA fixtures and Stripe's official sandbox values.
Read Guide→
Stripe sandbox test-card scenarios, credentials, expected results, and source-verification details
Scenario / Test GoalTest Card NumberExpiryCVVExpected ResultVerification
Successful charge (Default)
4242 4242 4242 4242Any future dateAny 3 digitsCharge succeeds immediately with status succeeded.Verified against official sourceRecorded: 2026-09-29Re-verified against the linked official provider documentation on 2026-09-29.
3D Secure (3DS) authentication required
4000 0000 0000 3220Any future dateAny 3 digits3D Secure authentication must be completed for the payment to be successful.Verified against official sourceRecorded: 2026-09-29Re-verified against the linked official provider documentation on 2026-09-29.
Card declined (generic decline)
error: card_declineddecline: generic_decline
4000 0000 0000 0002Any future dateAny 3 digitsReturns error code card_declined with decline code generic_decline.Verified against official sourceRecorded: 2026-09-29Re-verified against the linked official provider documentation on 2026-09-29.
Insufficient funds
error: card_declineddecline: insufficient_funds
4000 0000 0000 9995Any future dateAny 3 digitsReturns error code card_declined with decline code insufficient_funds.Verified against official sourceRecorded: 2026-09-29Re-verified against the linked official provider documentation on 2026-09-29.
Expired card
error: expired_card
4000 0000 0000 0069Any future dateAny 3 digitsReturns error code expired_card; Stripe lists no decline code for this simulation.Verified against official sourceRecorded: 2026-09-29Re-verified against the linked official provider documentation on 2026-09-29.
Mastercard success
5555 5555 5555 4444Any future dateAny 3 digitsSuccessful charge on Mastercard test card.Verified against official sourceRecorded: 2026-09-29Re-verified against the linked official provider documentation on 2026-09-29.

Using Stripe Test Cards in Development

Stripe test cards are designed exclusively for simulating payment states in Stripe test mode. Stripe's sandbox checks transactions against internal test-mode simulation rules rather than real banking card networks, so generic synthetic test numbers are not intended or verified to trigger predictable sandbox outcomes.

1. Use Stripe Test-Mode Credentials

Use publishable test keys (starting with pk_test_) in the client and secret test keys (starting with sk_test_) only on the server. Never expose secret keys in client-side code.

2. Enter Test Credentials in Elements or API

Enter official test numbers into Stripe Elements, Checkout, or programmatic server-side PaymentIntent test requests. Use any future expiration date (e.g., 12/34) and any 3-digit CVC (or 4 digits for Amex).

3. Trigger Success, 3DS, or Decline Flows

Use provider-designated cards from the reference table above to simulate specific states: the default Visa card (ending in 4242) for immediate success, the 3D Secure card (ending in 3220) for authentication challenge modal verification, or failure cards for decline UI testing.

4. Verify Webhooks & PaymentIntent States

Verify how your application handles asynchronous webhook events, including payment_intent.succeeded, payment_intent.payment_failed, and charge refund events.

Testing Stripe Decline Codes

Stripe documents separate error-code and decline-code fields. Issuer declines use error code card_declined with a more specific decline_code; some simulations, including the expired-card case, instead return a specific error code with no decline code.

  • generic_declineTriggered by the generic decline card (ending in 0002). Use to test general payment rejection messages.
  • insufficient_fundsTriggered by the insufficient funds card (ending in 9995). Use to test customer balance alerts and card re-prompting.
  • error: expired_cardTriggered by the expired card simulation (ending in 0069). Stripe lists the decline code as not applicable for this case.
Other Gateway Sandboxes:PayPalAdyenBraintreeSquareRazorpay

Related Payment Testing Tools & Resources