Card Test Number: How Sandbox Card Numbers Work

Our Cards

Choose from any of our gift cards to give to your loved ones

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

Where to Buy?

You can purchase a gift card from any of these locations

ABOUT US

about

What is ONYX GiftCards?

Onyx Gift Cards is a Grenadian company designed to introduce, market and manage gift cards systems in Grenada for retailers and corporations. We are enthusiastic about the effect and influence we will have on the local market. We intend to expand our systems regionally with a range of product offerings and services.

What is a Gift Card?

Gift cards are the preferred way of giving and receiving gifts. They carry a monetary value that can be redeemed for gifts at your favorite store.
Onyx GiftCards are “Open Gift Cards” which means that they can be redeemed at multiple merchant locations. They are standard credit card size, can fit into the average wallet and made of PVC plastic. Onyx GiftCards are Barcoded for security and safety for the consumer and bear a disclaimer at the back.
Onyx Giftcards can be bought with a branded Card backer which is black in colour and is designed to fit the card. There is an area to write a brief message to the recipient as well.

How it Works?

  • Buy an Onyx Gift Card at these local stores
  • Give your gift card to friends, family, co-workers, etc.
  • The recipient can shop at our select merchants nationwide
  • Your friends, family, co-workers, etc. will present their gift card at checkout to pay for your item(s)
  • They will walk away happy with the best gift ever...the gift of Choice

Why ONYX GiftCards?

  • Save TIME. No need to run around looking for the perfect gift
  • Redeem from a variety of business island-wide. We will continue adding businesses as fast as ONYX grows.
  • ONYX Gift Cards do not expire
  • Cards are valued at convinient amounts to meet every need and occasion

A card test number is a fake card number that a payment gateway accepts in sandbox mode and rejects against live money. Developers use it to run authorizations, declines, refunds, and 3-D Secure challenges without touching a real account. The numbers are public, they cost nothing, and they work only inside test environments.

What can you do with a card test number?

You can drive a full payment flow with one: tokenize, authorize, capture, refund, void, and simulate a chargeback. Each processor publishes a list and ties specific numbers to specific results.

Cover each branch of your checkout with a named test number, then assert on the response code. That keeps a failing test readable when the payment logic breaks.

What do the digits in a card number mean?

The first six to eight digits form the BIN, which sets the card brand and the issuing bank. The rest identify the account, and the final digit is a checksum.

Why does the Luhn check matter in testing?

Gateways run a Luhn check before they send anything to the card network. One wrong digit produces an "invalid card number" error instead of a decline, and that error comes from your own validation path, not the bank.

When a test fails at validation, check Luhn first. It saves an hour of reading gateway logs for a request that never arrived.

Do expiry and CVV matter in sandbox mode?

Most sandboxes accept any future expiry date and any three or four digit CVV. Some processors fix those values in their docs, so read the table for the number you picked.

Which test card numbers should you use?

Start with the success case, then add one number for each failure you want to cover. This list covers the common cases at most processors; confirm the exact number against the docs for your gateway before you ship.

Behavior maps change. A number that produced a decline last year may approve today, so re-run the suite after a processor announces a docs update.

How do you test a card number step by step?

  1. Open a sandbox account with your processor and copy the API keys for test mode.
  2. Pick a test number that matches the outcome you want to check.
  3. Send the charge request with a future expiry, a CVV from the docs, and a small amount such as 1.00.
  4. Compare the response code and message against the outcome the docs promise.
  5. Log the request ID, not the card number, then repeat for the next case.

Run the same set in CI on every deploy. Payment code breaks when someone edits a rounding rule or a currency map, and the test numbers catch it before customers do.

What mistakes do teams make with test numbers?

Keep test numbers in a fixture file, keyed by the outcome they trigger. That keeps the intent visible in code review.

Test numbers vs real card data

A test PAN fails at a live endpoint by design. Real card numbers carry obligations: PCI DSS scope, encryption at rest, and a hard rule against storing the CVV after authorization.

Nothing about a sandbox number carries over to a live account. A test card is a development tool, not a way to charge anyone, and using card data that belongs to someone else is card fraud in every US state.

Frequently asked questions

Does a card test number work on a live store?

No. Live endpoints route to the card network, and a sandbox PAN has no account behind it. The charge returns a decline or an invalid number error.

Why does 4242 4242 4242 4242 get declined on my site?

Your integration is pointed at live keys. Switch the API key and the endpoint to test mode, then run the charge again.

Is it legal to use test card numbers?

Yes, inside your own sandbox. Using a card number that belongs to someone else is fraud, and no test number changes that.

What CVV do I use in test mode?

Any three digits for Visa, Mastercard, and Discover, or four for Amex, unless your processor lists a fixed value. The CVV check still runs; it just checks against the test profile.

How many test numbers do I need?

Five or six cover most suites: one success per brand you accept, plus declines for insufficient funds, an expired card, and a failed 3-D Secure challenge.

Contact Us

Latest

Read our complete guide: Should You Buy CVV From a Card Shop? The Honest Buyer's Guide