Card Validation Test Guide: Luhn, CVV, and Sandbox Checks

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 validation test checks that a payment form or API accepts well formed card data and rejects bad data before anything reaches the processor. The fastest way to run one is a sandbox account from a processor such as Stripe, Adyen, or Braintree, paired with that sandbox's published test card numbers. Those numbers pass the Luhn checksum and trigger specific responses, so you can exercise approvals, declines, and 3-D Secure challenges without touching a real account.

What a card validation test verifies

A card validation test is a QA pass over the data your checkout collects before it is sent to an acquirer. You are checking format, not credit. The card number must satisfy the Luhn checksum and match the expected length for its BIN. The expiry must be a real calendar month and a date the form still accepts. The security code must fit the format tied to the card brand. The name field must survive accents, hyphens, and apostrophes.

Use case: run these checks on every build of the payment form, and again after any change to the input mask, the locale, or the validation library.

Sandbox test numbers compared with production smoke tests

Processors publish test card numbers that behave like live cards inside a sandbox. Stripe, for example, documents numbers that trigger approvals, named decline codes, and authentication challenges. They let you build a repeatable suite without exposing a real account.

Sandbox test numbers

Production smoke tests

Recommendation: keep the sandbox suite as the default release gate, and run one small production smoke test with your own card after credential or routing changes.

The Luhn check and its limits

Luhn is a checksum, not proof of ownership. A number can pass Luhn and still belong to nobody. Treat it as a typo filter that stops obviously mistyped data from reaching the processor and burning an authorization attempt.

Do not build business logic on top of it. A valid checksum does not mean the account is open, funded, or authorized. Only the issuer's authorization response tells you that, and the answer can change within minutes.

CVV and expiry: what you can and cannot test

You can test the format of the security code. You cannot test whether it is correct without an authorization request, because the issuer holds that answer. PCI DSS treats the code as sensitive authentication data, which must not be stored after authorization, encrypted or otherwise. A test plan that keeps codes in logs or fixtures is a compliance failure, not a test win. Expiry works the same way: you can confirm the format and reject past dates locally, but only the issuer knows whether the card is still active.

Use case: write the negative tests first, since rejected input is the path most likely to break when a form adds a new brand or a new locale.

A test matrix that covers the real failure modes

  1. Valid test number, valid expiry, valid code: expect approval.
  2. Number with one digit changed: expect a Luhn rejection before any network call.
  3. Expired month: expect a local rejection with a clear message.
  4. Past year with a valid month, and a future year with an invalid month.
  5. Three digit code on a four digit brand, and the reverse.
  6. Whitespace, hyphens, and mixed formatting pasted into the field.
  7. Sandbox decline codes, including insufficient funds and do not honor.
  8. A 3-D Secure challenge abandoned halfway through.
  9. Network timeout and a double submit of the same form.

Recommendation: run the full matrix in the sandbox on every release candidate, and keep one synthetic variant in production monitoring that never retains card data.

Contact Us

Latest

Buy CVV: A Comprehensive Buying Guide

Discover the ins and outs of purchasing CVVs with our expert buying guide. Learn the essentials, avoid common pitfalls, and get answers to frequently asked questions.

Buying Guide: Exchange CVV Dumps for Cash

Discover the ins and outs of exchanging CVV dumps for cash, including essential tips, what to look for, pitfalls to avoid, and a FAQ section to help you navigate this complex market safely.

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