Note: A valid credit card number means that it can be validated by the algorithm used to encrypt the number. It doesn’t mean that you can use this number to make a purchase.
Decrypting the Credit Card Numbers
There are 16 digits in the credit card number and it can be divided into three parts.
- The first digit represents the major industry identifier (MII). It identify the institution/industry that issues the card. For example, number that starts with:
1 and 2 are issued by airlines. 3 is issued by travel and entertainment, such as American Express and Diners Club. 4 is issued by VISA 5 is issued by MasterCard 6 is issued by merchandising and banking. 7 is issued by petroleum companies. 8 is issued by telecommunications companies. 9 is issued by national assignment.
Together with the next 5 digits, the first 6 digits of the string of number form the Issuer Identification Numbers (IIN). This will tell you who is the exact institution that distribute this credit card. If you can follow the pattern, a bank issuing a VISA credit card will have the first digit as “4” and the bank code for the next five digits. All VISA credit cards issued from this bank will have the same six beginning digits. 2. The 7th – 15th digits of the credit card number represent the customer account number. This is unique for each customer. It allows the bank to identify the owner of the card. 3. The last digit is a check digit that is used to verify the first fifteen digits. It makes use of the Luhn Algorithm (also known as Mod 10 algorithm). How it works is very simple: For example:
Take the credit card number 3782 8224 6310 005 Starting from the right, double the digits on the even position, this will give us: 3 14 8 4 8 4 2 8 6 6 1 0 0 0 5 Adding up the digits for the number that is more than 9: 3 5 8 4 8 4 2 8 6 6 1 0 0 0 5 Add up all the digits: 3 + 5 + 8 + 4 + 8 + 4 + 2 + 8 + 6 + 6 + 1 + 5 = 60 which is divisible by 10
If you work backward, you can easily work out the last digit of the credit card number. For example, assume that the last number is unknown, so we have 3782 8224 6310 00x
Starting from the right, double the digits on the even position, this will give us: 3 14 8 4 8 4 2 8 6 6 1 0 0 0 x Adding up the digits for the number that is more than 9: 3 5 8 4 8 4 2 8 6 6 1 0 0 0 x Add up all the digits: 3 + 5 + 8 + 4 + 8 + 4 + 2 + 8 + 6 + 6 + 1 + x = 55 + x. The nearest number that is divisible by 10 is 60, so x has to be 5
What is a CVV Number?
When you make an online purchase, other than the credit card number, the payment gateway will also ask you to enter a CVV number that is located at the back of the credit card. The CVV number is generated by encrypting the card number, expiry card and a secret encryption keys (which is unique for every issuing bank). This is a security feature and it is not easily crackable.
Resources for obtaining valid credit card numbers
If you are a developer and need to test your payment gateway without using your actual credit card number, you can make use of Credit card numbers generator to obtain a series of valid credit card numbers. You can select the issuing bank and number of entries. Paypal also comes with a list of credit card numbers that you can use to test. Now that you know the “secret” to your credit card numbers, you can go ahead and test it out with your credit cards. Image credit: commerce bank card, Living on Credit Cards