🚀 NEW FEATURE: Edit & Rewind - Discover a new, smarter way to edit long and complex tests

Close announcement

Stripe Test Cards - Comprehensive List

A critical component of developing a flawless payment system is the ability to test transactions thoroughly before going live. This is where Stripe test cards come into play, offering a secure and effective way to test payment processes without involving real money. This article shows how you can use test cards, providing insights into how they can optimize payment system development.

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.

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

-   Visa: 4242 4242 4242 4242, CVC: Any 3 digits, Date: Any future date

-   Visa (Debit): 4000 0566 5566 5556, CVC: Any 3 digits, Date: Any future date

-   Mastercard: 5555 5555 5555 4444, CVC: Any 3 digits, Date: Any future date

-   Mastercard (2-Series): 2223 0031 2200 3222, CVC: Any 3 digits, Date: Any future date

-   Mastercard (Debit): 5200 8282 8282 8210, CVC: Any 3 digits, Date: Any future date

-   Mastercard (Prepaid): 5105 1051 0510 5100, CVC: Any 3 digits, Date: Any future date

-   American Express: 3782 822463 10005 & 3714 496353 98431, CVC: Any 4 digits, Date: Any future date

-   Discover: 6011 1111 1111 1117 & 6011 0009 9013 9424, CVC: Any 3 digits, Date: Any future date

-   Diners Club: 3056 9300 0902 0004, CVC: Any 3 digits, Date: Any future date

-   Diners Club (14-digit card): 3622 720627 1667, CVC: Any 3 digits, Date: Any future date

-   JCB: 3566 0020 2036 0505, CVC: Any 3 digits, Date: Any future date

-   UnionPay: 6200 0000 0000 0005 & 6200 0000 0000 0047, CVC: Any 3 digits, Date: Any future date

Co-Branded Cards

-   Cartes Bancaires/Visa: 4000 0025 0000 1001, CVC: Any 3 digits, Date: Any future date

-   Cartes Bancaires/Mastercard: 5555 5525 0000 1001, CVC: Any 3 digits, Date: Any future date

-   eftpos Australia/Visa: 4000 0503 6000 0001, CVC: Any 3 digits, Date: Any future date

-   eftpos Australia/Mastercard: 5555 0503 6000 0080, CVC: Any 3 digits, Date: Any future date

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.

-   United States (US): Visa: 4242 4242 4242 4242

-   Argentina (AR): Visa: 4000 0003 2000 0021

-   Brazil (BR): Visa: 4000 0007 6000 0002

-   Canada (CA): Visa: 4000 0012 4000 0000

-   Mexico (MX): Visa: 4000 0484 0000 8001

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

Declined Payments

-   Generic Decline: 4000 0000 0000 0002, Error Code: card_declined, Decline Code: generic_decline

-   Insufficient Funds: 4000 0000 0000 9995, Error Code: card_declined, Decline Code: insufficient_funds

-   Lost Card: 4000 0000 0000 9987, Error Code: card_declined, Decline Code: lost_card

-   Stolen Card: 4000 0000 0000 9979, Error Code: card_declined, Decline Code: stolen_card

Fraud Prevention

-   Always Blocked: 4100 0000 0000 0019, Details: The charge has a risk level of "highest"

-   Highest Risk: 4000 0000 0000 4954, Details: The charge has a risk level of "highest"

-   Elevated Risk: 4000 0000 0000 9235, Details: The charge has a risk level of "elevated"

3D Secure Authentication

-   3DS Required, OK: 4000 0000 0000 3220, Outcome: 3D Secure authentication must be completed for the payment to be successful.

-   3DS Supported, Unenrolled: 4242 4242 4242 4242, Outcome: 3D Secure is supported but not enrolled.

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.

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!

Speed up the entire testing process now

Automate web app testing easier than ever. Without excessive costs. Faster than coding. Free forever.
Dominik Szahidewicz

Technical Writer

Dominik Szahidewicz is a technical writer with experience in data science and application consulting. He's skilled in using tools such as Figma, ServiceNow, ERP, Notepad++ and VM Oracle. His skills also include knowledge of English, French and SQL.

Outside of work, he is an active musician and pianist, playing in several bands of different genres, including jazz/hip-hop, neo-soul and organic dub.

Don't miss any updates
Get more tips and product related content. Zero spam.