The PAN, along with the expiration date, is a bit like sesame because it allows you to make payments online, sometimes without requiring the cryptogram. It consists of two main parts :
– Bank code, older « Bank Identification Number / BIN » and now calles « Issuer identification number / IIN », composed of two parts : card issuer code (Visa, Mastercard, American Express, Discover …) and bank code.
– Card number.
PAN has a size ranging from 13 to 19 digits, but in France, it generally has a size of 16 digits grouped 4 by 4.
Cut can thus be broken down as you can see in this picture.
All the possible values for a card number are not necessarily valid and for that, they must check Luhn’s formula, which consists in making the sum of each digit by multiplying by 2 those of the odd ranks (with the particularity that if the sum exceeds 9, sum the 2 digits, so 6×2-> 12 -> 1 + 2 -> 3). The result must be a multiple of 10.
4 9 7 8 8 7 3 8 6 3 6 9 8 0 0 7
8 9 5 8 7 7 6 8 3 3 3 9 7 0 0 7 (here we multiply the numbers in odd rows by 2)
8+9+5+8+7+7+6+8+3+3+3+9+7+0+0+7=90
PAN is valid !