Usually, the first digit of Visa card is 4, the first digit of MasterCard is 5, the first digit of UnionPay card is 6, JCB card and American Express card usually start with 3.
The first 6 digits (including the first digit) are the card issuer code (Issuer Identification Number, referred to as IIN), which is used to identify the specific card issuer.
These numbers are defined by the banks themselves, and each bank has different rules. If it is a standard 12-digit number, there are about trillions of combinations, which means that each card issuer can provide trillions of different credit cards; but many credit cards only use 9 digits, which constitutes the 16-digit number we usually see. Digit credit card number.
This number generally uses the Luhn algorithm to verify the card number. The Luhn algorithm, also known as the "modulo 10 algorithm", is a simple checksum algorithm generally used to verify identification codes. Let's take a look at how the last check digit is calculated.
Add the obtained number to all the remaining numbers (even digits). If the number obtained after multiplying by 2 is a 2-digit number, add its ones and tens digits. Add;