A test credit card is a card number that a payment processor publishes for use in its test mode. It passes the same format checks a live card passes, and it moves no money. The number 4242 4242 4242 4242 is the common example. Test cards work against sandbox API keys. They fail against live keys.

Sandbox Test Credit Card: How to Use It for Safe Testing

Who publishes test card numbers

Each processor keeps its own list, and the lists differ. Stripe, Adyen, PayPal with Braintree, and Checkout.com all publish sandbox card numbers in their developer documentation. A number from one list does not carry over to another processor. The sandbox reads the number, matches it against a table, and returns a fixed response.

test credit card number

Numbers you will see in sandbox docs

  • 4242 4242 4242 4242, Visa, payment succeeds, Stripe.
  • 4000 0000 0000 0002, Visa, generic decline, Stripe.
  • 4000 0000 0000 9995, Visa, insufficient funds decline, Stripe.
  • 4000 0025 0000 3155, Visa, authentication required, Stripe.
  • 5555 5555 5555 4444, Mastercard, payment succeeds, Stripe.
  • 3782 822463 10005, American Express, payment succeeds, Stripe.
  • 4111 1111 1111 1111, Visa, listed by Adyen and Braintree in their sandbox guides.

Expiry dates in test mode accept any future month and year. CVC fields accept any 3 digits, or 4 digits for American Express. Postal code checks accept any value unless the account has address verification turned on.

what is a test credit card

How to run a test transaction

  1. Switch the account to test mode and copy the test publishable key and test secret key.
  2. Load the payment form with the test key.
  3. Enter a published test number, a future expiry, and any CVC.
  4. Submit and read the response object. It carries a status such as succeeded, requires_action, or declined.
  5. Repeat with a decline number to confirm error handling on the front end.

What a test card cannot do

A test card does not reach a card issuer. No authorization is requested and no funds are reserved. The processor simulates the response, so sandbox results do not prove how a real issuer will behave on the same BIN. Test numbers also fail on live checkout pages, and using a live card number in a test environment breaks PCI DSS rules. Sandbox testing requires test numbers only.

what is a test credit card

Number format and the Luhn check

Card numbers run 13 to 19 digits. The first 6 to 8 digits form the BIN or IIN, which identifies the issuer and the card brand. The final digit is a check digit computed with the Luhn algorithm, defined in ISO/IEC 7812-1. A number that fails Luhn is rejected before any network call. Published test numbers pass Luhn by design.

What changes in 2026

The test number lists stay stable. The changes sit around them. Sandboxes now ship 3D Secure 2 test cards that force a challenge, and SCA test cards for European rules. Network tokenization test cases exist for stored credentials. Recurring payment tests need a card flagged for off-session use. Confirm each case against the processor docs for the account region, since test tables update without notice.