A test card number is a card number published by a payment processor for use in a sandbox. The number passes the Luhn check and has the same shape as a real card. It routes to a simulator, not to a bank. No account is charged. No funds move.

Who publishes test card numbers

Stripe, Adyen, PayPal, Braintree, Worldpay, and Mastercard each publish a set of test numbers in developer documentation. Each processor ties those numbers to its own test mode. A Stripe test card works in the Stripe test environment. It fails at a live gateway.

Common test card numbers

  • Visa: 4242 4242 4242 4242 (Stripe), 4111 1111 1111 1111 (Adyen, Braintree)
  • Mastercard: 5555 5555 5555 4444
  • American Express: 3782 822463 10005, 15 digits
  • Discover: 6011 1111 1111 1117
  • JCB: 3566 0020 2036 0505

These numbers come from public documentation. They are not issued to any cardholder. Any expiry date in the future works, and the CVC field accepts any 3 digits, or 4 digits for American Express.

Simulated declines

Processors also publish numbers that trigger a known error. Stripe maps 4000 0000 0000 0002 to a generic decline and 4000 0000 0000 9995 to insufficient funds. A tester can exercise the failure path without touching a real account. Decline codes drive the error messages a customer sees at checkout.

The Luhn check

Every test card passes the Luhn algorithm. To run the check: start at the rightmost digit, double every second digit, subtract 9 from any result above 9, sum all digits, then divide by 10. A remainder of 0 means the number is well formed. Luhn catches typos, swapped digits, and missing characters. It does not prove a card exists.

Test cards against live systems

Test numbers fail on live endpoints. A gateway returns codes such as invalid card number or card not supported. Some processors block the 4242 prefix in production for this reason.

Use a test card in a sandbox with a test API key. A passing test charge is not proof that a real card works. A real authorization depends on the issuer, the balance, the address check, and the fraud rules of the acquirer.

Limits

Test numbers cover a small set of outcomes. They do not model 3-D Secure challenges, issuer timeouts, or partial approvals in every processor. Check the documentation for the gateway you integrate. Numbers change when a processor retires a sandbox.