Stripe Test Cards - Comprehensive List

The main Stripe test card is 4242 4242 4242 4242 — use any future expiry date, any 3-digit CVC and any postal code. It simulates a successful Visa payment in test mode. For a generic decline, use 4000 0000 0000 0002; for 3D Secure authentication, use 4000 0025 0000 3155. Full list below.

🤖 Summarize this article with AI:

💬 ChatGPT     🔍 Perplexity     💥 Claude     🐦 Grok      🔮 Google AI Mode

How To Use Stripe Credit Card Test Data

Stripe equips developers with test API keys and a comprehensive list of Stripe test credit card numbers, enabling the simulation of realistic payment scenarios without the exchange of real money. These test cards, accessible directly in the Stripe Dashboard or via the Stripe API in test mode, are designed to mimic various aspects of card payments, from successful transactions to card declines and error messages.

This functionality is crucial for validating the integration of your payment gateway with Stripe payments, ensuring that everything from the payment form to the backend processes operates flawlessly.

Automate your tests for free

Test easier than ever with BugBug test recorder. Faster than coding. Free forever.

Get started

Test Credit Card Numbers Stripe (Debit and Credit)

By employing these test cards to simulate different types of card payments - including debit and credit cards from major issuers - developers can thoroughly test their Stripe integration. The process encompasses everything from user interaction, where the user is prompted to insert their card information, to the final stages of payment authorization and processing. Stripe's testing environment is also equipped to handle card presentment scenarios, thanks to physical test cards and simulated test cards facilitated by Stripe Terminal SDKs.

These tools are invaluable for exploring a wide range of testing scenarios, ensuring that the payment gateway can handle various payment flows and card network specifics. Moreover, Stripe documentation and resources like the Stripe CLI, pre-installed with capabilities to simulate payments and create test data, support a detailed examination of both test and live modes.

Engaging with Stripe's test cards and API in test mode allows for a detailed, hands-on understanding of how to effectively test and prepare your payment integration for the demands of real-world transactions, making them an indispensable resource for any developer looking to refine their online payment solutions.

Check out Stripe Form Recording - the new feature of BugBug.

Comprehensive List of Stripe Test Cards

Utilizing test cards allows developers to explore and troubleshoot the entire spectrum of payment flows, from simple transactions to more complex scenarios involving various payment methods. This hands-on testing approach ensures that all potential issues are identified and resolved before any real financial transactions take place.

By engaging with Stripe's test environment, developers can gain confidence in their payment systems, knowing they have rigorously tested their implementations against a wide range of simulated conditions. Stripe provides a detailed list of test cards for various card brands, each capable of simulating different scenarios within the payment process. These include:

Successful Payments by Card Brand

Unless noted otherwise, use any future expiry date, any three-digit CVC and any postal code. American Express test cards require a four-digit CVC.

Card brand Test card number CVC Expected result
Visa 4242 4242 4242 4242 Any 3 digits Successful payment
Visa (debit) 4000 0566 5566 5556 Any 3 digits Successful payment
Mastercard 5555 5555 5555 4444 Any 3 digits Successful payment
Mastercard (2-series) 2223 0031 2200 3222 Any 3 digits Successful payment
Mastercard (debit) 5200 8282 8282 8210 Any 3 digits Successful payment
Mastercard (prepaid) 5105 1051 0510 5100 Any 3 digits Successful payment
American Express 3782 822463 10005 Any 4 digits Successful payment
American Express 3714 496353 98431 Any 4 digits Successful payment
Discover 6011 1111 1111 1117 Any 3 digits Successful payment
Discover 6011 0009 9013 9424 Any 3 digits Successful payment
Diners Club 3056 9300 0902 0004 Any 3 digits Successful payment
Diners Club (14-digit card) 3622 720627 1667 Any 3 digits Successful payment
JCB 3566 0020 2036 0505 Any 3 digits Successful payment
UnionPay 6200 0000 0000 0005 Any 3 digits Successful payment
UnionPay (debit) 6200 0000 0000 0047 Any 3 digits Successful payment

Co-Branded Cards

Card brand Test card number CVC Expected result
Cartes Bancaires/Visa 4000 0025 0000 1001 Any 3 digits Successful payment
Cartes Bancaires/Mastercard 5555 5525 0000 1001 Any 3 digits Successful payment
eftpos Australia/Visa 4000 0503 6000 0001 Any 3 digits Successful payment
eftpos Australia/Mastercard 5555 0503 6000 0080 Any 3 digits Successful payment

Successful Payments by Country

Stripe test cards also extend their utility by simulating successful payments from various countries, such as the United States, Argentina, Brazil, Canada, and Mexico, among others. This feature is invaluable for developers aiming to ensure their payment systems are equipped for international transactions.

Country Card brand Test card number Expected result
United States (US) Visa 4242 4242 4242 4242 Successful payment
Argentina (AR) Visa 4000 0003 2000 0021 Successful payment
Brazil (BR) Visa 4000 0007 6000 0002 Successful payment
Canada (CA) Visa 4000 0012 4000 0000 Successful payment
Mexico (MX) Visa 4000 0484 0000 8001 Successful payment

For other countries, refer to specific country cards provided in the text above.

Declined Payments

Scenario Test card number Error code Decline code
Generic decline 4000 0000 0000 0002 card_declined generic_decline
Insufficient funds 4000 0000 0000 9995 card_declined insufficient_funds
Lost card 4000 0000 0000 9987 card_declined lost_card
Stolen card 4000 0000 0000 9979 card_declined stolen_card

Fraud Prevention

Scenario Test card number Expected result
Always blocked 4100 0000 0000 0019 The charge has the highest risk level, and Stripe Radar always blocks it.
Highest risk 4000 0000 0000 4954 The charge has the highest risk level and might be blocked, depending on the Radar settings.
Elevated risk 4000 0000 0000 9235 The charge has an elevated risk level and might be queued for review.

3D Secure Authentication

Scenario Test card number Expected result
Authenticate unless set up 4000 0025 0000 3155 On-session payments always require authentication. Off-session payments require authentication unless the card has been set up for future use.
3DS required 4000 0000 0000 3220 3D Secure authentication must be completed for the payment to succeed.
3DS supported, unenrolled 4242 4242 4242 4242 The card supports 3D Secure but is not enrolled, so the customer is not prompted to authenticate.

Automate your tests for free

Test easier than ever with BugBug test recorder. Faster than coding. Free forever.

Get started

Declined Payments and Fraud Prevention

To thoroughly test the resilience and error-handling capabilities of payment systems, Stripe offers test cards that simulate declined transactions for reasons such as insufficient funds, lost or stolen cards, and generic declines. Additionally, cards that simulate transactions with varying levels of fraud risk are available, enabling developers to test their systems' fraud prevention mechanisms effectively.

Automate your tests for free

Test easier than ever with BugBug test recorder. Faster than coding. Free forever.

Get started

Implementing Stripe Card Details in Your Testing Strategy

Incorporating Stripe test card details into the development and testing workflows is crucial for a comprehensive testing process. Developers are advised to simulate a wide range of transaction scenarios, including successful payments, declined transactions, and fraud alerts, to ensure the payment system is robust and user-friendly.

To make the most of Stripe test cards, developers should adhere to best practices such as ensuring the Stripe integration is in test mode when using these numbers and avoiding common pitfalls like using random or real card numbers, which can lead to unpredictable results.

Final Thoughts

The ability to simulate various payment scenarios securely and effectively is crucial for the development of a reliable payment processing system. Stripe test cards provide a comprehensive solution for this need, enabling developers to refine their systems for optimal performance in real-world conditions. By leveraging these test cards, businesses can ensure their payment processes are seamless, secure, and ready to handle transactions on a global scale, ultimately enhancing the user experience and supporting business growth.

Happy (automated) testing!

Your next release. Properly tested.

Join 1,200+ QA teams that automated their
regression coverage with BugBug.

Start testing. It's free.
  • Free plan
  • No credit card
  • 14-days trial

Author

Dominik Szahidewicz

Software Quality Evangelist

Dominik Szahidewicz is a Software Quality Evangelist specialising in quality assurance, test automation, and modern software testing practices. He creates practical, research-driven content that helps QA professionals, developers, and product teams improve test coverage, automate repetitive testing, and release more reliable web applications.

Drawing on his experience in technical writing, data analysis, and application consulting, Dominik translates complex testing concepts into clear, actionable guidance. His areas of interest include end-to-end testing, low-code test automation, regression testing, and the use of AI in software quality assurance.