toolqik

27 · Test Data

Test Credit Card Numbers

Official payment-gateway test cards with expiry, CVC and expected result.

Runs in your browser
Test mode only. These numbers work only in a payment provider’s test (sandbox) mode. They can’t buy anything, and this tool never creates numbers that could belong to real cards.
Format
Options
Test cards

  

About this tool

Checkout flows need card numbers to test with, but real cards must never be used in development, and randomly generated “valid-looking” numbers can belong to real cardholders. Payment providers solve this with test card numbers that only work in sandbox mode and trigger specific results: success, a particular decline, or a 3D Secure challenge. This tool lists Stripe’s official test cards and adds a random future expiry date, CVC and cardholder name to each, as a list, JSON or CSV.

Stripe test cards

CardNumberResult in test mode
Visa4242 4242 4242 4242Payment succeeds
Visa (debit)4000 0566 5566 5556Payment succeeds
Mastercard5555 5555 5555 4444Payment succeeds
Mastercard (2-series)2223 0031 2200 3222Payment succeeds
Mastercard (debit)5200 8282 8282 8210Payment succeeds
American Express3782 822463 10005Payment succeeds
American Express3714 496353 98431Payment succeeds
Discover6011 1111 1111 1117Payment succeeds
Diners Club3056 9300 0902 0004Payment succeeds
JCB3566 0020 2036 0505Payment succeeds
UnionPay6200 0000 0000 0005Payment succeeds
Visa4000 0000 0000 0002Declined: generic decline
Visa4000 0000 0000 9995Declined: insufficient funds
Visa4000 0000 0000 9987Declined: lost card
Visa4000 0000 0000 9979Declined: stolen card
Visa4000 0000 0000 0069Declined: expired card
Visa4000 0000 0000 0127Declined: incorrect CVC
Visa4000 0000 0000 0119Declined: processing error
Visa4000 0025 0000 31553D Secure authentication required
Visa4000 0027 6000 31843D Secure required on every payment

Use any future expiry date, any 3-digit CVC (4 digits for American Express) and any name and postcode. Check Stripe’s testing documentation for the full, current list, including cards for specific countries, disputes and refunds.

Other payment providers

Every gateway publishes its own test cards, and many reject other providers’ numbers. Razorpay, PayPal (Braintree), Adyen, Square and Checkout.com each have a “test cards” page in their documentation: search for “provider name test cards”. Many sandboxes also accept the classic Visa test number 4111 1111 1111 1111.

What to test

  • Declines: show a clear message for insufficient funds, expired cards and wrong CVCs, and let the customer try another card.
  • 3D Secure: required for most card payments in Europe and India. Test that the challenge appears and that your order is only confirmed after it succeeds.
  • Webhooks: confirm orders from the payment provider’s webhook, not only the browser redirect. Use the Webhook Tester to inspect the events.
  • Never log full card numbers, even test ones, so your logging is safe when real cards arrive.

FAQ

What credit card number can I use for testing?

Use your payment provider’s test cards. For Stripe in test mode, 4242 4242 4242 4242 with any future expiry date and any CVC succeeds.

Do these card numbers work for real purchases?

No. They only work in a payment provider’s test mode and are rejected by live payment systems.

Why not generate random valid card numbers?

A number that passes the Luhn check can belong to a real cardholder. Official test numbers are guaranteed to be fake and produce predictable results.

How do I test a declined payment?

Choose the “Declined payment” scenario. Each Stripe decline card triggers a specific reason, such as insufficient funds or an incorrect CVC.

What expiry date and CVC should I use?

Any date in the future and any 3-digit CVC (4 digits for American Express). This tool fills them in for you.

esc
↑↓ navigate↵ open