View all services
Talk to QA Advisor
Free tool · Test data

Stripe test cards and test card numbers

Every Stripe, Razorpay, Braintree and Adyen number here was checked digit by digit against the gateway’s own documentation, along with the outcome it triggers. Use them to test the paths that matter most and get tested least: declines, authentication challenges, fraud blocks and disputes.

Runs entirely in your browser. Nothing you enter is sent to a server.

Spaces and hyphens are ignored. Never enter a real card number here or in any other testing tool.

  • Stripe test card · Success

    Payment succeeds

Valid Visa number format

A published test number. It only works in a gateway test mode or sandbox.

  • PassDigits only. Contains only digits once spaces and hyphens are removed.
  • PassNetwork. Leading digits match Visa.
  • PassLength. 16 digits is valid for Visa.
  • PassLuhn checksum. Passes the mod 10 check every major network uses.

Test card numbers by gateway and scenario

171 numbers checked digit by digit against Stripe, Razorpay, Braintree and Adyen documentation.

Stripe test mode: any future expiry date, any 3-digit CVC (4 digits for American Express) and any value for other fields.

Successful payments by card network, including debit, prepaid and the 14-digit Diners length.

  • 4242 4242 4242 4242VisaPayment succeeds
  • 4000 0566 5566 5556Visa (debit)Payment succeeds
  • 5555 5555 5555 4444MastercardPayment succeeds
  • 2223 0031 2200 3222Mastercard (2-series)Payment succeeds
  • 5200 8282 8282 8210Mastercard (debit)Payment succeeds
  • 5105 1051 0510 5100Mastercard (prepaid)Payment succeeds
  • 3782 822463 10005American ExpressPayment succeeds. CVC is 4 digits
  • 3714 496353 98431American ExpressPayment succeeds. CVC is 4 digits
  • 6011 1111 1111 1117DiscoverPayment succeeds
  • 6011 0009 9013 9424DiscoverPayment succeeds
  • 3056 9300 0902 0004Diners ClubPayment succeeds
  • 3622 7206 2716 67Diners Club (14-digit)Payment succeeds. Tests 14-digit length handling
  • 3566 0020 2036 0505JCBPayment succeeds
  • 6200 0000 0000 0005UnionPayPayment succeeds

Source: Stripe documentation. Gateways change test numbers, so treat their documentation as the authority.

Adyen declines by cardholder name

Adyen does not use special cards for declines. Pay with any test card above and type one of these values as the cardholder name, or send the code in additionalData.RequestedTestAcquirerResponseCode, to get that refusal back.

Adyen test refusal reasons
Refusal reasonCardholder nameCode
RefusedDECLINED2
Expired CardCARD_EXPIRED6
Not enough balanceNOT_ENOUGH_BALANCE12
CVC DeclinedCVC_DECLINED24
Blocked CardBLOCK_CARD5
3D Not AuthenticatedNOT_3D_AUTHENTICATED11
Issuer UnavailableISSUER_UNAVAILABLE9
Acquirer Error (result code Error)ERROR4
FRAUDFRAUD20
Issuer Suspected FraudISSUER_SUSPECTED_FRAUD31
Transaction Not PermittedTRANSACTION_NOT_PERMITTED23
Pending (result code Received)PENDING13

The full list of refusal values is in Adyen’s result code testing guide. Payment methods that redirect to a simulator ignore the cardholder name.

Official test card documentation

Test numbers are gateway specific. Use each gateway’s own list.

Braintree decides by amount

In the Braintree sandbox the transaction amount, not the card, selects the outcome. Amounts from 0.01 to 1999.99 are authorised. An amount from 2000.00 to 2999.99 is declined by the processor with a response code equal to the amount, so 2001.00 returns code 2001, insufficient funds.

Amounts from 3000.00 to 3000.99 fail with code 3000, and 5001.00 is rejected by the gateway. If your checkout rounds, discounts or adds tax, make sure the amount that reaches the gateway is the one you intended to test.

How to use

How to use the Test credit card numbers

  1. 1Paste any card number into the validator to check its Luhn checksum, length and network, and to see which gateways publish it as a test number.
  2. 2Pick a gateway and the scenario you need, then copy its number. In Stripe test mode, use any future expiry date and any three-digit CVC, or four digits for American Express.
  3. 3In Razorpay test mode, a mock bank page appears after you pay. Choose Failure there to receive the error an error card is listed with.
  4. 4In the Braintree sandbox, change the amount rather than the card to trigger a decline. For any other gateway, use its own test numbers from the documentation links.

Never test with real cards

A real card number in a test environment brings that environment into scope for PCI DSS, the payment card security standard, with all the controls that implies. It also tends to end up in logs, screenshots and defect reports, which is how card data leaks from organisations that would never knowingly store it. Gateway test numbers exist so that nobody needs to.

The validator flags any number that passes the Luhn check but is not a published test number. That is not proof it is a real card, but it is reason enough not to paste it anywhere else.

What the Luhn check does and does not tell you

The Luhn algorithm is a checksum: the last digit is calculated from the others so that a mistyped number can be caught before a payment is attempted. It catches every single-digit error and almost every swap of two adjacent digits. It says nothing about whether the account exists, has funds or belongs to the person typing it.

For a checkout form that makes it a fast, local first check, never a substitute for the gateway response. A form that accepts a number because it passes Luhn, and then handles the gateway decline badly, has tested the easy part.

How the Luhn algorithm works

Start from the rightmost digit, which is the check digit, and move left. Leave that digit as it is and double every second digit after it. Where doubling gives a two-digit number, subtract 9, so 8 doubled becomes 16 and then 7. Add every digit together. The number is valid if the total is a multiple of 10.

The textbook example is 79927398713. From the right, the digits contribute 3, 2, 7, 7, 9, 6, 7, 4, 9, 9 and 7, which total 70. Seventy divides by ten, so the number passes. Change any single digit and the total moves off a multiple of ten, which is how the check catches typing errors.

Implementations go wrong in three predictable places: doubling from the left instead of the right, which only works for numbers of even length; treating the input as a number instead of a string, which silently loses precision on most card numbers because they exceed the largest integer JavaScript can hold exactly; and validating before stripping the spaces people type. A unit test with a 15-digit American Express number catches the first.

Test the decline paths, not just success

Most checkout testing stops at a successful payment, but a decline is the moment a customer most needs the interface to help. Each decline needs a different response from the interface. Insufficient funds should invite another payment method. An expired card should point at the expiry field. An incorrect CVC should mark that field without clearing the rest of the form. A processing error should allow a retry without creating a duplicate order.

A card blocked for fraud is the exception: the message to the customer should be generic. Telling someone their payment was blocked as suspected fraud helps a fraudster calibrate the next attempt.

Authentication is now the common case

Strong customer authentication is mandatory for most card payments in the UK and the European Economic Area, and the Reserve Bank of India requires an additional factor of authentication for domestic card payments made online. The authentication cards trigger that challenge, so test the full journey: the challenge appearing, the customer completing it, the customer abandoning it, and authentication failing.

The abandoned case is the one most often broken. A customer who closes the challenge window should land somewhere sensible with their basket intact, not on a blank page or a duplicate order.

Disputes arrive after the payment succeeded

The dispute card charges successfully and is then disputed. That tests what most teams never look at: whether the dispute notification from the gateway is received, whether the order is flagged, whether stock and fulfilment respond, and whether anyone is told. These are webhook flows, so they need testing on an environment that can actually receive the gateway’s webhooks.

Every gateway has its own test numbers

Test numbers only work in the sandbox of the gateway that published them, and the same number can mean different things to different gateways. 5105 1051 0510 5100 completes a payment in Stripe and Razorpay test modes but fails card verification in the Braintree sandbox. The validator above lists every meaning a number has.

Some gateways do not use card numbers to select an outcome at all. In the Braintree sandbox, a transaction amount between 2000.00 and 2999.99 is declined by the processor with a response code equal to the amount, whichever test card is used. Razorpay test mode instead shows a mock bank page where you choose success or failure. Adyen uses the cardholder name: pay with any Adyen test card and enter DECLINED, CARD_EXPIRED or another listed value as the name to receive that refusal.

The Stripe, Razorpay, Braintree and Adyen numbers here are listed in full because each was checked against that gateway’s documentation. Gateways do change their test numbers, so their own documentation remains the authority, and for every other gateway it is the only source to use.

QAble service

Banking and payments testing

QAble tests payment flows including the parts most teams skip: declines, authentication challenges, webhooks, refunds and disputes.

Explore the service
FAQ

Frequently asked questions

What is the Stripe test card number?

4242 4242 4242 4242 is the standard Stripe test card: a Visa number that completes a payment in test mode. Use any future expiry date and any three-digit CVC. For declines, 4000 0000 0000 0002 returns a generic decline and 4000 0000 0000 9995 returns insufficient funds.

What are the Razorpay test card numbers?

For a successful domestic payment in Razorpay test mode, use 4100 2800 0000 1007 (Visa) or 5555 5100 0008 1006 (Mastercard) with any CVV and any future expiry. Error cards such as 4100 2800 0008 0001 for insufficient funds are in the Razorpay tab above: choose Failure on the mock bank page to receive the error.

What are the Adyen test card numbers?

Adyen publishes cards for every network it supports, such as 4111 1111 1111 1111 (Visa) and 5555 5555 5555 4444 (Mastercard), each with a fixed expiry and security code, usually 03/2030 and 737. Declines come from the cardholder name rather than the card: enter DECLINED as the name to get a refusal. All of them are in the Adyen tab above.

How does the Luhn algorithm work?

Starting from the rightmost digit and moving left, double every second digit, subtract 9 from any result over 9, and add all the digits together. If the total is a multiple of 10, the number passes. It is a checksum for catching typing errors, not a check that the card exists.

Are test card numbers the same as fake credit card numbers?

Test card numbers are the legitimate kind. Gateways publish them so developers can test payments without real cards, and they only work in test mode. Randomly generated numbers that pass the Luhn check are different: they can collide with real cards and they trigger no documented outcome, so they are no use for testing.

Can I use these card numbers on a live website?

No. They only work in a gateway’s test mode or sandbox. Submitted to a live payment form they are declined, and attempting to use them to obtain goods or services is fraud.

What expiry date and CVC should I use with Stripe test cards?

Any date in the future and any three-digit CVC. American Express test cards take a four-digit CVC. Some scenarios, such as the expired card, are triggered by the card number rather than by the date you enter.

Why does a number I made up pass the validator?

Because the Luhn check is a checksum, not an account lookup. Roughly one in ten random numbers of the right length passes it. Passing means the number is well formed, not that it is a real card.

Why not generate random valid card numbers?

A randomly generated number that passes Luhn in a real issuer range can belong to a real cardholder. Published test numbers are guaranteed not to be issued, and they trigger documented outcomes, which random numbers do not.

Which card tests 3D Secure?

In Stripe test mode, 4000 0000 0000 3220 requires 3D Secure to be completed for the payment to succeed, and 4000 0027 6000 3184 requires authentication on every transaction. Both are in the authentication group above.

Is it safe to type a card number into this page?

The validator runs entirely in your browser and sends nothing anywhere. Even so, never type a real card number into any testing tool, this one included.

Need the edge cases found for you?

QAble testers work through the inputs, payment paths and data that break products in production, before your users find them.

Talk to QA Advisor