Eli5: how does platforms like Steam or Amazon know if you’re using a correct visa card or not if you didn’t buy anything with it?

611 views

When you enter your card details to add it to your account and you write 1 number wrong, it instantly tells you that the card is wrong. How do they know?

In: Technology

7 Answers

Anonymous 0 Comments

Credit Card numbers are generated with something called the Luhn algorithm. It is a checksum algorithm. It takes the 15 real digits of your credit card and determines the 16th.

This means that only one final digit is valid, and 9 are invalid. If you type a number in wrong, it will definitely fail the checksum.

The algorithm also counts every second digit differently (they’re doubled). This means that simply swapping digits also causes a failure, which is the most common type of error when typing a card number.

You are viewing 1 out of 7 answers, click here to view all answers.