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 source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16. |
| 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 source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16. |
| Card declined (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 source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16. |
| Insufficient funds | 4000 0000 0000 9995 | Any future date | Any 3 digits | Payment fails with decline code insufficient_funds. | Verified against official source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16. |
| Expired card | 4000 0000 0000 0069 | Any future date | Any 3 digits | Payment fails with decline code expired_card. | Verified against official source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16. |
| Mastercard success | 5555 5555 5555 4444 | Any future date | Any 3 digits | Successful charge on Mastercard test card. | Verified against official source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16. |
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 cannot 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 returns explicit decline codes during failed test-mode charges to let you verify error handling in checkout UIs. When a transaction fails, the API responds with an error code of card_declined accompanied by a specific, verified decline_code:
- generic_decline Triggered by the generic decline card (ending in 0002). Use to test general payment rejection messages.
- insufficient_funds Triggered by the insufficient funds card (ending in 9995). Use to test customer balance alerts and card re-prompting.
- expired_card Triggered by the expired card simulation (ending in 0069). Use to test expired card UI prompts and cardholder notifications.
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.