Eli5: How do they know if it is a valid card number?

340 views

When you are asked to input your card information online, how is it that some websites can automatically know if you input an invalid number and others cannot, before payment is processed?Example: as soon as I typed the last number of my card wrong, it went red and would not allow me to continue before I corrected it.

In: 340

8 Answers

Anonymous 0 Comments

The last digit in the credit card number is a check digit. It is calculated based on the other digits. So if you know all but the last digit you can calculate the last digit, and similarly if you know all the digits you can check if they are typed inn wrong. If the check digit is right it does not mean that the credit card number actually belongs to the payee or even anyone. But it makes it harder to make simple mistakes like typing inn the wrong digit or swapping two digits around.

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