Every credit card number contains a six digit prefix. It is this prefix or sequence of digits at the beginning of the number that determines which network the credit card belongs to. These first six digits of the credit card number are referred to as the Bank Identification Number or BIN. The bank identification number is used to identify what institution issued the card to the card holder and the remaining digits of the number are allocated by the issuer.
Bank identification numbers or BINs for short are usually considered to be sensitive information and is normally provided by merchant service providers. These merchant service providers are normally able to supply monthly updated BIN number range tables for most card brands (VISA, MasterCard, etc.)
The first digit of your credit card number is known as the Major Industry Identifier (MII) and represents which category of entity issued the card. The issuer categories and their associated MIIs are as follows.
ISO/TC 68 and other industry assignments
Airlines
Airlines and other industry assignments
Travel and entertainment
Banking and financial
Banking and financial
Merchandising and banking
Petroleum
Telecommunications and other industry assignments
National assignment
For an example, VISA and MasterCard are a part of the banking and financial category and will have a first digit of 4 or 5. Diner’s Club and American Express are in the travel and entertainment category and will therefore have a 3 as the fist digit. SUN Oil and Exxon cards are in the petroleum category and begin with a 7.
The first six digits of a credit card, including the MII digit, form what is known as an issuer identifier. This in turn means that the total possible number of issuers is 1 million.
If the MII digit is a 9 and then the next three digits of the issuer identifier are the 3-digit country codes defined in ISO 3166, and the remaining final two digits of the issuer identifier can be defined by the national standards body of the specified country in whatever way it desires.
The 7th digit through to the penultimate digit of your credit card number is the individual account identifier. The maximum length of a credit card number is a total of 19 digits. The initial 6 digits of a credit card number are the issuer identifier and the final digit is a check digit. Therefore, the maximum length of the individual account number is 12 digits. This gives every issuer the possibility of 1 trillion different account numbers.
The last digit on a credit card is known as the check digit. The algorithm that is used to arrive at the proper check digit is known as the Luhn algorithm. The algorithm was named after Hans Peter Luhn (1896-1964), an IBM scientist, who was awarded US Patent 2950048 for the technique in 1960.