Card Number Validation System: Checks, Luhn Steps, Limits

Our Cards

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

Card Number Validation Techniques: Luhn, BIN and Length Checks

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

read more

Where to Buy?

You can purchase a gift card from any of these locations

card number validation system

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 number validation system checks whether a payment card number is well formed before any authorization request goes out. It confirms digit count, issuer prefix, and the Luhn check digit, then maps the leading digits to an issuing bank. It does not confirm the card exists, is open, or carries funds. Those answers arrive only from the issuer through an authorization response.

What a validation system actually checks

Every item on that list is a format test. A number that passes all of them can still belong to a closed account or to a card that was never issued.

Prerequisites

Build the validation flow

  1. Strip spaces, hyphens, and any non-digit character from the input.
  2. Reject anything outside the 12 to 19 digit range.
  3. Match the leading digits against the BIN table and store the brand.
  4. Apply the brand length rule and reject a mismatch.
  5. Run the Luhn algorithm across the full number.
  6. Compare the computed check digit with the last digit and reject on mismatch.
  7. Validate expiry month and year against the current date.
  8. Check the security code length against the brand rule.
  9. Pass the surviving number to your processor for authorization.
  10. Log the response code and BIN, never the full number.

How the Luhn check works

Start at the rightmost digit and move left. Double every second digit. When a doubled digit reaches 10 or more, subtract 9. Sum the results. The number is valid when the total divides by 10. The algorithm catches single-digit typos and most adjacent transpositions, which is why the industry uses it as a first-pass input filter.

What the system cannot tell you

Roughly one in ten random 16-digit strings passes Luhn, so a checksum alone is not a fraud control. A working validation layer pairs format checks with velocity limits, device signals, and issuer response codes. Keep the authorization response and discard the card data; PCI DSS forbids retaining the security code after authorization.

Common implementation mistakes

Contact Us

Latest

Latest

How to Sell CVV

Learn how to safely sell CVV cards and protect yourself from legal consequences.

Ultimate Guide to Safely Buying CVV

Discover how to safely purchase CVV numbers without risking your financial security. This comprehensive guide provides expert advice and tips for navigating the risks and pitfalls.

Buy CVV Website

Find the best place to buy CVV online with our comprehensive guide.

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