A test card number is a publicly published card number that payment processors hand out for sandbox testing, letting developers run checkout, refund, and subscription flows without ever touching a real cardholder's data. This guide explains what these numbers are, how they behave inside a test environment, and how to use them responsibly.

Key Features

  • Published openly by payment processors for sandbox use only
  • Pass the standard Luhn checksum, so validation logic behaves exactly as it does in production
  • Paired with matching expiry dates and security codes for complete form testing
  • Available in variants that trigger approvals, declines, insufficient funds, and 3-D Secure challenges
  • Support recurring billing, partial captures, refunds, and void scenarios
  • Never linked to a real account, balance, or cardholder
  • Free to copy, share across teams, and hard-code into automated test suites

Formats and Specifications

Test card numbers follow the same structure as live ones: sixteen digits for Visa and Mastercard, fifteen for American Express, plus a future expiry date and a three- or four-digit security code. They are drawn from reserved ranges that issuers never assign to real customers, and they only work while your API keys are in test mode. Against a live endpoint the same digits are simply declined, which is exactly the safeguard you want. Always pull the current list from your processor's own developer documentation, since ranges and behaviour flags are updated periodically.

Delivery and Support

Everything here is digital, so there is nothing to ship and no courier to wait on. Access is immediate, updates arrive free whenever processor documentation changes, and a straightforward refund policy applies if the guidance does not match your integration.

Is a test card number safe to use?

Yes, as long as it stays inside a sandbox environment. These numbers carry no value and cannot be charged, so there is no financial exposure for you or anyone else.

Will a test card number work on a real checkout page?

No. Live payment gateways reject them outright, which is precisely how the system stops test data from becoming a real transaction.

Where do test card numbers come from?

Payment service providers publish them in their developer documentation, usually next to the expected response codes for each scenario.