MTE Explains : How Do Credit Card Numbers Work?

MTE Explains : How Do Credit Card Numbers Work?

MTE-Explains-How-Do-Credit-Card-Numbers-Work

Credit cards are very common these days and if you own one, you will know that it consists of a series of 16 numbers required to purchase online or offline stuff. The digits look random with a brief peek and it doesn’t seem to have a specific pattern related to it but in fact, the numbers do follow a certain system and it is easy to produce a string of authentic credit card numbers. Now, let’s analyze how a credit card number works.

 

Note: An authentic credit card number that the algorithm used to encrypt the number can authenticate it. You cannot use that number to make any purchases online or offline.

 

Credit Card Number Decrypting

The 16 numbers in a credit card can be divided into three parts.

 

1) The first number depicts the MII (Major Industry Identifier). It determines the industry or an institution that supplies the card. Illustrating an example:

  • 1 and 2 are provided by the airline
  • Entertainment and travel companies provide number 3. For e.g. Diners Club, American Express
  • Visa Issues number 4
  • MasterCard issues number 5
  • Merchandising and banking issues number 6
  • Petroleum companies issue number 7
  • Telecommunication companies issue number 8
  • National assignment issues number 9

Along with the next five digits, the first six digits of the series of the numbers establish the Issuer Identification numbers (IIN). That will point out the institution or industry that distributed this credit card accurately. If you can follow the sequence, a bank providing a VISA credit card will have “4” as the first digit and the next five digits will be the bank code. The beginning six numbers will be the same for all the VISA credit cards issued from this bank.

 

2) Numbers from 7 to 15 of the credit card depict the account number of the customer. It is unique for every customer and helps the bank to determine the owner of the card.

 

3) The last number is used to verify the first 15 numbers by using the Luhn algorithm (Mod 10 algorithm). It works in a very simple fashion:

  • Make a note of your credit card number and count from the right, doubling the numbers in the even position ( 2, 4, 6…to 16)
  • In case the doubled number is more than 9, add up the numbers to get a single number. Example, add 1 and 4 to get 5 if the doubled digit is 14.
  • After that, add all the numbers and the answer should be divisible by 10.

 

Example:

1. Let’s assume 3782 8224 6310 005 as a credit card number

2. Double up the numbers on the even position, starting from the right. This gives you 3 14 8 4 8 4 2 8 6 6 1 0 0 0 5

3. Now, add the numbers for the digits that are more than the number 9. This gives you 3 5 8 4 8 4 2 8 6 6 1 0 0 0 5

4. Now add all the numbers and the result as you can see is 60. 60 is divisible by 10.

By working backwards, you can figure out the last number of the credit card.

 

Assuming that we don’t know the last digit, the number is 3782 8224 6310 –x

1. Doubling the numbers on the even position, working from the right, we have 3 14 8 4 8 4 2 8 6 6 1 0 0 0 x

2. Adding the numbers that are more than 9 gives us 3 5 8 4 8 4 2 8 6 6 1 0 0 0 x

3. The result of adding the numbers mentioned above is 55+x. The number that is divisible by 10, nearest to 55 is 60 and hence x is 5.

 

What’s a CVV Number?

When you buy stuff online, you are required to enter the CVV number present at the back of your card. You will also have to enter your credit card information while purchasing anything online. The CVV number is produced by encrypting the credit card number including the expiry card and secret encryption keys. The secret encryption keys are unique for every bank that issues the credit card. It is not easy to crack it as it is a security feature. The CVV number is a must as almost every payment gateway requests you to enter the number.

 

Resources to get valid credit card numbers

For developers who want to test their payment gateway avoiding the usage of their own credit card numbers, they can always use the credit card number generator. The credit card number generator produces a series of authentic credit card numbers. They can select the bank that issues it including the amount of entries. The bank issuing the credit card always has a list various entries of credit cards. To test the credit card numbers, one can use Paypal as it contains numerous credit card numbers. It is very easy to test the numbers by using the credit card generator.

 

That’s the secret behind your credit card numbers and you can always go ahead and test them.


Did you remember to share this with your friends?