Free, helpful information about Card Guides and related Test Credit Card Numbers Stripe topics.
Get clear and easy-to-understand details about Test Credit Card Numbers Stripe topics and resources.
Answer a few optional questions to receive offers or information related to Card Guides. The survey is optional and not required to access your free guide.
If you're building a payment integration with Stripe or testing a checkout flow, you'll need test card numbers to simulate transactions without charging real accounts. Understanding how Stripe's test environment works—and what card numbers are available—is essential for safe, effective development and quality assurance.
Test card numbers are fictional payment credentials that Stripe provides to developers and businesses for testing purposes. They're designed to mimic real credit cards in your development or sandbox environment, allowing you to verify that your payment flows work correctly before going live.
When you use a test card number in Stripe's test mode, no actual charge occurs, and no real funds are processed. These numbers only work in test mode—they'll be rejected immediately in live mode, preventing accidental charges.
Stripe separates two distinct operational modes: test mode and live mode. Each has its own set of API keys, card numbers, and transaction records.
Your Stripe dashboard clearly labels which mode you're in and displays the appropriate API keys for each. Using a test key in live mode (or vice versa) will prevent transactions from processing, which is an intentional safety feature.
Stripe provides a range of test card numbers that trigger different outcomes, helping you test various scenarios:
| Card Number | Brand | Purpose |
|---|---|---|
| 4242 4242 4242 4242 | Visa | Standard successful charge |
| 5555 5555 5555 4444 | Mastercard | Standard successful charge |
| 3782 822463 10005 | American Express | Standard successful charge (different format) |
| 4000 0000 0000 0002 | Visa | Charge declined |
| 4000 0025 0000 3155 | Visa | Charge disputed/fraudulent |
| 4000 0000 0000 9995 | Visa | CVC check fails |
Each test card number can be paired with any expiration date in the future and any three- or four-digit CVC code. The specific values don't matter in test mode—Stripe ignores them and processes based solely on the card number itself.
Testing only with successful card numbers tells you part of the story. Real-world payment processing involves declines, fraud blocks, expired cards, and invalid security codes. By testing with the full range of test cards Stripe provides, you can verify that:
This is why responsible development requires testing the failure paths, not just the happy path.
Your testing strategy will depend on several factors:
Integration type: Whether you're using Stripe's pre-built payment form (Stripe.js), building a custom form, or using a higher-level abstraction like Stripe's payment element affects which test scenarios matter most to you.
Complexity of your flow: Simple one-time charges require fewer test cases than subscriptions, split payments, or multi-step checkout flows.
Compliance requirements: If your product handles sensitive customer data or operates in regulated industries, your testing checklist will be more extensive.
Team structure: Solo developers may focus on core scenarios; larger teams might test exhaustively across browsers, devices, and edge cases.
Test cards only work in test mode—this is enforced automatically by Stripe. You should never hard-code card numbers (test or real) in your application or version control. Instead, accept card information directly from users through Stripe's secure payment forms or tokenization endpoints.
When you're ready to go live, switch to your live API keys, and real card numbers will be required. Stripe's test data and live data are completely isolated, so there's no risk of test transactions affecting real accounts.
The specific test cards and scenarios most relevant to you depend on:
Stripe's full documentation lists additional test cards for specific scenarios (3D Secure, international cards, and more). Review those details against your actual product requirements to build a testing plan that covers the paths your real customers will take.
