Test Payment Card Guide for Developers | Sandbox Cards Explained

The best test payment card set for most teams is the one published inside your own payment processor's sandbox, because it is the only set guaranteed to match the response codes your integration actually has to handle. The criteria that matter are sandbox isolation (the number fails in live mode), scenario coverage (approvals, declines, 3-D Secure challenges, expired cards), stability over time, and whether the card data is meant for reuse in automated tests. Everything below compares the three realistic sources of test card data and tells you which one fits which job.

What a test payment card actually is

A test payment card is a card number that a processor, acquirer, or card network publishes for use in a non-production environment. It looks like a normal primary account number, passes the Luhn check, and is tied to reserved ranges that live authorization systems reject. The card verification value that ships with it is a fixture value, not a secret tied to a real account. That distinction matters: a test card exists to make your code branch, not to move money. If a number can be charged in production, it is not a test card, whatever the listing says.

Option 1: Sandbox cards published by your processor

Stripe, Adyen, Braintree, and most other gateways document their own test numbers. These are the numbers your staging environment is built around.

Use it when: you are testing end-to-end checkout, subscription retries, webhook handling, or 3-D Secure challenge flows. This is the default choice.

Option 2: Luhn-valid numbers you generate yourself

For unit tests of form validation, you often just need a string that passes a checksum. Generating your own keeps tests deterministic and independent of any vendor.

Use it when: you are testing client-side validation, formatting, masking, or error copy.

Option 3: Network and acquirer certification ranges

Card networks and acquirers maintain certification BINs for terminal and gateway certification. These are closest to production behavior.

Use it when: you are certifying a terminal, a gateway, or a new acquiring connection, and only then.

How to choose a set for your project

  1. Confirm the numbers work only in the sandbox you are targeting.
  2. Check that the set covers the branches in your code: success, soft decline, hard decline, expired card, and authentication required.
  3. Pin the values you use in version control so a silent change at the provider does not break CI.
  4. Keep test credentials in environment variables and out of source.
  5. Never reuse a real cardholder's number, even for a one-off test.

Mistakes that cause real damage

Recommendation by use case

One thing worth stating plainly: test cards are a development tool. Buying, selling, or trading real card data is card fraud, not testing, and it carries criminal liability. Keep the two categories separate in your head and in your codebase.

More

Read our complete guide: Buy CVV Cheap: Pricing, Risks, and What First-Time Buyers Need to Know