A Stripe test card is a publicly documented card number that works only in Stripe test mode to simulate a payment outcome without moving real money. Use it with test API keys and test data, and never enter real cardholder information into a test account.
What a Stripe test card does
Stripe test cards let developers check checkout forms, payment intents, subscriptions, and error handling before a site accepts live payments. A test card triggers a predictable response, such as success, decline, or authentication challenge, based on the number and the test settings in the Stripe Dashboard.
Test mode is separate from live mode. Charges created in test mode do not settle, and test cards do not work against live API keys. That separation is the main safety control for payment testing.
How to use a Stripe test card
- Open the Stripe Dashboard and confirm that test mode is active.
- Use your test publishable key and test secret key in the test environment.
- Enter a documented test card number, any future expiration date, and any three-digit CVC.
- Submit the payment and review the response in the Dashboard or API logs.
- Repeat with decline cards and authentication test cards to cover common paths.
Keep test keys out of public code when possible, and label test environments so team members do not confuse them with production.
Common Stripe test card numbers
- 4242 4242 4242 4242: basic successful payment.
- 4000 0000 0000 0002: generic decline.
- 4000 0000 0000 9995: insufficient funds decline.
- 4000 0000 0000 3220: test card that requires 3D Secure authentication.
Stripe updates its test card list over time. Check the official Stripe documentation for current numbers, expected decline codes, and regional test cases.
Testing declines, errors, and authentication
A payment test plan should cover more than the happy path. Use decline cards to verify error messages, retry logic, and customer support flows. Use authentication cards to confirm that 3D Secure steps render and return the expected result. Test subscriptions, refunds, and webhooks in test mode as well, since these flows can fail even when a basic charge succeeds.
Safety and compliance rules
Use only documented test card numbers. Do not paste real card numbers into test forms, support tickets, screenshots, or logs. PCI DSS controls apply to systems that store, process, or transmit cardholder data, and test data practices should support those controls. If a test account touches production-like data, restrict access and remove the data when testing ends.
Card testing fraud is a separate risk from payment testing. Attackers use stolen card numbers to probe payment forms with small charges. Monitor for spikes in failed payments, use fraud tools, and follow Stripe guidance for blocking suspicious traffic.
Troubleshooting a Stripe test card
- Confirm that test mode is on and that the request uses test keys.
- Check that the card number is complete and matches a documented test case.
- Review the API response for a decline code or validation error.
- Confirm that webhooks point to the test endpoint, not the live endpoint.
If a test card behaves differently from the documentation, compare the API version, account settings, and payment method configuration. A Stripe test card is a diagnostic tool, so record the exact number, response code, and request details when asking for help.