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.
| Scenario / Test Goal | Test Card Number | Expiry | CVV | Expected Result | Verification |
|---|---|---|---|---|---|
Successful charge (Default) | 4242 4242 4242 4242 | Any future date | Any 3 digits | Charge 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 3220 | Any future date | Any 3 digits | 3D 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 0002 | Any future date | Any 3 digits | Returns 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 9995 | Any future date | Any 3 digits | Returns 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 0069 | Any future date | Any 3 digits | Returns 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 4444 | Any future date | Any 3 digits | Successful 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.
Related Payment Testing Tools & Resources
Gateway Sandbox Directory
Browse verified sandbox test cards, decline scenarios, and 3D Secure credentials for all major payment gateways.
Test Card Reference Guide
Understand the difference between synthetic test cards and official gateway sandbox cards.
Credit Card Validator
Validate card length, network prefix schemes, and Modulo 10 Luhn checksums locally.