Credit Card: Is your credit card valid or not? This is how Amazon-Flipkart finds out
Credit card numbers are not random but are generated by an algorithm that helps in validation and banking. You may have been using a credit card for years, but you may not know how the credit card number is validated and how the online portal knows which card (Visa or MasterCard) you have.

Tech News: Even if you have been using a credit card for years, there are still many things related to credit cards that we do not even know about. Recently, a software engineer working as a solution architect in an MNC and a person fond of online shopping shared a thread on X (formerly Twitter) in which it was explained how a credit card number works.
Apart from this, FinPal also posted on X and said, "Have you ever wondered how online portals (Amazon and Flipkart) instantly find out whether the credit card number is valid or not and what bank offers are available related to the card?" In a conversation with ET Wealth Online, FinPal has informed us that credit card numbers are not random; they are generated using a hidden algorithm for quick validation and to make banking easier.
How is a credit card number validated?
According to Finpal, banks use the Luhn Algorithm to verify the credit card number provided by the user. Finpal said the algorithm checks whether the sum of all the numbers (added by doubling every other digit) is divisible by 10. If it is divisible by 10, then the credit card number is valid.
The bank uses the BIN (Bank Identification Number) system; the first 6 to 8 digits of the card number tell the portal who issued the card, and the portal uses the BIN range to check if there are any offers available on your card.
Visa or Mastercard, how is the card's address known?
Finpal says that the first digit is the Major Industry Identifier (MII), which identifies the card network. The first 6-8 digits are the BIN (Bank Identification Number), which indicates the bank and card type, such as Visa Infinite, and a specific card, such as HDFC Infinia.