Credit Card Test Numbers: Sandbox Cards Explained

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 credit card test number is a fake card number that works only inside a payment gateway's sandbox environment. Gateways publish these numbers so developers can run charges without touching a real card. The best known example is 4242 4242 4242 4242, a Visa test number that returns an approval in Stripe, PayPal, and most other sandboxes.

What Is a Credit Card Test Number?

A test card number looks like a real card number and passes the same Luhn checksum check. The gateway reserves it, so no bank issues it and no cardholder can be charged. Test numbers exist so you can build checkout pages, refunds, and subscription billing without moving money.

Each gateway maps its test numbers to a result. One number returns an approval, another returns a decline, a third forces a 3D Secure challenge. That mapping lets you exercise every branch of your payment code.

Common Test Card Numbers by Gateway

Numbers differ between processors, so pull the list from the docs of the gateway you use.

Stripe

Stripe's sandbox uses 4242 4242 4242 4242 for a successful Visa charge. 4000 0000 0000 0002 returns a generic decline. Stripe lists further numbers for insufficient funds, expired cards, and 3D Secure flows.

PayPal and Braintree

PayPal's developer sandbox issues its own test cards inside the test account dashboard. Braintree, which PayPal owns, publishes a separate list in its developer docs.

Adyen, Authorize.Net, and Checkout.com

These gateways document their own ranges. Use the number from your provider instead of a number copied from a forum post, because the response codes differ from platform to platform.

How Test Numbers Behave in a Sandbox

How to Test a Payment Flow

  1. Switch your API keys to test mode and confirm the base URL points at the sandbox host.
  2. Open your gateway's test card page and copy the numbers you need.
  3. Run a full purchase with the approval number and check the order record.
  4. Repeat with the decline number and confirm your error handling shows a clear message.
  5. Test refunds, partial refunds, and a subscription renewal.
  6. Clear test data from your staging database before you ship.

Test Card Numbers vs. Real Card Numbers

A test number lives in a sandbox database. A real card number lives at an issuing bank and links to a credit line. The two never overlap, because card networks reserve the ranges that gateways hand out for testing.

Storing real card data brings PCI DSS obligations. Test data does not, which is one reason to build the whole flow with sandbox numbers first.

Testing Subscriptions, Refunds, and Disputes

Test numbers cover the full lifecycle, not just the first charge. You can create a subscription, let it renew, refund it, and simulate a dispute. Some gateways ship numbers that force a renewal failure so you can check your dunning emails.

Is It Legal to Use a Credit Card Test Number?

Yes, when you point it at a sandbox you control or at your own test account. No, when you aim it at a live payment endpoint or use it to probe a system you do not own.

Running real card data through a payment page to see which accounts are still open is card testing, and in the United States that falls under 18 U.S.C. 1029, the access device fraud statute. Buying or selling card data is a crime on its own. A sandbox number holds no value and cannot work on a live gateway.

What Is Card Testing Fraud?

Card testing is the practice of running small charges on stolen card numbers to learn which ones still work. The people behind it then sell or reuse the live cards. Merchants absorb the damage through chargeback fees, processor penalties, and account termination.

Test numbers give developers a safe way to build. They give a fraudster nothing, since the numbers are published in public docs and rejected by live systems.

How Do You Stop Card Testing on Your Site?

What Happens If a Test Number Reaches a Live Gateway?

The charge fails with a card declined or invalid card number error. No money moves. Check the API keys in your config, then rerun the flow against the sandbox.

FAQ

Do credit card test numbers work in live mode?

No. Live gateways reject them because no issuer recognizes the number.

Where do I find test numbers for my gateway?

In the developer documentation for that gateway. Look for a page titled test cards or test payment methods.

Can I make up a 16 digit number?

You can build one that passes Luhn, but it returns a generic decline unless it matches a number your sandbox knows about.

Do test numbers expire?

No. They stay valid for as long as the gateway keeps them in its sandbox, and the expiry date you type does not matter.

Key Takeaways

Contact Us

Latest

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