See How Credit Card Validation Works

Credit Card Validation Screen ShotEver wonder how to validate a credit card or how sites are able to detect if that card entered in is valid without actually connecting to a server. However complex it may seem on the surface, underneath it is quite simple as you can see it fully explained by this page here that breaks down the steps in validating a credit card number. They have stepped though a single example however you can enter in your own test card number to see how it validates. I tried a few just random numbers to see if they would validate. After a few tries I was not only able to get cards to validate, but also I can now switch between different card types, such as VISA, Mastercard and AMEX. Many things that I did not realize have been brought to light such as the first digit on a credit card actually determines the industry the card services.

Example of a number I tried for testing was: 4024-0071-8284-5075

Which returned

Validation Info

Message: Card failed to be valid.
Card Length: 16
Card Type: Visa (16 digit)
Formatted: 4024-0071-8284-5075
Checksum: MOD Validation shows that this is not a validate card.
Check Digit: 2
Fixed: 4024-0071-8284-5072

Once I entered in the fixed number from above the number validated, and I was able to use it in testing my online application. This service of generating credit card numbers is invaluable as having many different numbers on hand for application testing, just makes the code that much more robust.

One Reply to “See How Credit Card Validation Works”

  1. Depending on how long ago you canceled your cards, and the snidtang on the cards when you canceled, you might try to see if they will rehab one of the cards.You might go to the Bank of America website. They have a card selector that you can do that will not pull a hard inquiry for a recommendation. If you apply for a recommended card, then they will pull a hard. Orchard Bank and HSBC also have the card selectors but they are not as prime as BoA.Stay away from Cap One. They do not report your credit limit, only the amount that you charge. That will definately hurt your utilization and lower your scores.