Testing Fresh
Simulate payments to test your integration. Test your integration in a sandbox — an isolated test environment where transactions don't move real funds.
How to use test cards
When testing, use your test API keys (sk_test_... and pk_test_...) in all API calls.
Do not use real card details in test mode. Use only the test card numbers below.
Testing interactively
In the Dashboard or any payment form:
- Card number:
4242 4242 4242 4242 - Expiry: any future date, e.g.
12/34 - CVC: any 3 digits (4 for Amex)
Testing in code
Use PaymentMethod tokens instead of card numbers:
bash
curl https://api.stripe.com/v1/payment_intents \
-u "sk_test_YOUR_KEY:" \
-d amount=500 \
-d currency=usd \
-d payment_method=pm_card_visa \
-d "payment_method_types[]=card"Test cards by brand
See the full table in Quick Reference → Test Cards.
Most commonly used:
| Brand | Number | CVC | Date |
|---|---|---|---|
| Visa | 4242424242424242 | Any 3 digits | Any future date |
| Mastercard | 5555555555554444 | Any 3 digits | Any future date |
| American Express | 378282246310005 | Any 4 digits | Any future date |
| Discover | 6011111111111117 | Any 3 digits | Any future date |
Decline scenarios
Test specific decline codes by using these cards:
| Scenario | Card number | Code |
|---|---|---|
| Generic decline | 4000000000000002 | card_declined |
| Insufficient funds | 4000000000009995 | insufficient_funds |
| Lost card | 4000000000009987 | lost_card |
| Stolen card | 4000000000009979 | stolen_card |
| Expired card | 4000000000000069 | expired_card |
| Incorrect CVC | 4000000000000127 | incorrect_cvc |
| Processing error | 4000000000000119 | processing_error |
| Blocked by Radar | 4000000000000101 | card_declined (Radar) |
3D Secure test cards
| Scenario | Card number |
|---|---|
| 3DS required | 4000002760003184 |
| 3DS supported but not required | 4000002500003155 |
| 3DS authentication fails | 4000008400001629 |
| 3DS — card not enrolled | 4000008400001280 |
PaymentMethod tokens for test code
| Token | Card |
|---|---|
pm_card_visa | Visa (succeeds) |
pm_card_mastercard | Mastercard (succeeds) |
pm_card_amex | American Express |
pm_card_visa_debit | Visa debit |
pm_card_chargeDeclined | Generic decline |
pm_card_chargeDeclinedInsufficientFunds | Insufficient funds |
pm_card_threeDSecure2Required | Requires 3DS2 |
Non-card payment method testing
Each payment method has its own test values. Examples:
ACH / US bank accounts:
- Routing:
110000000 - Account:
000123456789(success),000111111116(fail)
SEPA Direct Debit:
- IBAN:
DE89370400440532013000
iDEAL, Bancontact, etc.:
- Use test mode — these methods always succeed in sandbox.
Testing webhooks locally
bash
# Forward events to your local server
stripe listen --forward-to localhost:3000/webhooks
# Trigger specific events
stripe trigger payment_intent.succeeded
stripe trigger customer.subscription.created
stripe trigger invoice.payment_failedSimulate specific charge outcomes
Stripe provides magic amounts for specific test behaviors:
| Amount | Behavior |
|---|---|
5000 (50.00) | Succeeds |
4000 (40.00) | Attaches to customer without charging |
9991 (99.91) | Always declines |
9992 (99.92) | Declines with insufficient_funds |
9993 (99.93) | Declines with lost_card |
Rate limits in testing
Don't use sandbox environments for load testing — you may hit rate limits. For load testing strategies, see the Stripe rate limits documentation.
Moving to live mode
When you're ready:
- Replace
sk_test_...withsk_live_... - Replace
pk_test_...withpk_live_... - Register live webhook endpoints (sandbox webhooks don't fire in live mode)
- Re-create any Products, Prices, and Coupons — test objects aren't usable in live mode