A Stripe test card is a card number that works only in test mode. It moves no real money and touches no real cardholder account. You enter it in your own checkout flow, submit the payment, and check the dashboard to confirm your integration behaves the way you expect. Test keys start with pk_test_ and sk_test_; live keys start with pk_live_ and sk_live_. If a test card is rejected, you are almost certainly pointed at live mode.
Prerequisites
- A Stripe account with test mode enabled
- Your test publishable key copied into the front end and your test secret key on the server
- A checkout page you can load in a browser
Run a successful test payment
- Open the Stripe dashboard and toggle the account into test mode.
- Copy the test publishable key into your payment form and the test secret key into your backend.
- Load your checkout page and enter 4242 4242 4242 4242 as the card number.
- Enter any future expiry date, any three digit CVC, and any postal code.
- Submit the form and wait for the confirmation screen.
- Open the Payments list in the dashboard and confirm the charge shows as succeeded.
Test card numbers by brand
- Visa credit: 4242 4242 4242 4242
- Visa debit: 4000 0566 5566 5556
- Mastercard credit: 5555 5555 5555 4444
- Mastercard debit: 5200 8282 8282 8210
- American Express: 3782 822463 10005
- Discover: 6011 1111 1111 1117
- Diners Club: 3056 9300 0902 0004
Every number above accepts any future expiry date. Amex uses a four digit CVC; the other brands use three digits. The postal code field accepts any value your form validation allows.
Trigger specific declines and errors
Stripe reserves certain numbers for failure paths so you can test error handling without waiting for a real bank response.
- Generic decline: 4000 0000 0000 0002
- Insufficient funds: 4000 0000 0000 9995
- Expired card: 4000 0000 0000 0069
- Incorrect CVC: 4000 0000 0000 0127
- Processing error: 4000 0000 0000 0119
Each one returns a distinct decline code, which lets you confirm your code maps the right message to the right customer-facing state.
Test 3D Secure and authentication
- Enter 4000 0000 0000 3220 to force an authentication challenge.
- Complete the challenge in the modal to see a successful authenticated payment.
- Enter 4000 0000 0000 3063 to simulate a failed authentication.
- Confirm your application handles the failed authentication branch without leaving the customer on a blank screen.
Common mistakes
- Using live keys in a staging environment, which returns a card declined error for every test number.
- Hardcoding a test number in production code paths instead of reading the key from configuration.
- Testing only the success case, so decline and authentication branches ship untested.
- Storing test card data as if it were a real payment method record.
Test cards exist to prove your integration logic. They never stand in for real cardholder data, and real card numbers should never be entered into a test environment.