There is some structure to the credit card number. The first digits is the issuer of the card. Notice how all Visa cards start with the digit 4, Mastercard used their 51-55 range but ran out so now their cards start with 2. So you can look up the first digits of the card in a big table and check if it is active and who the issuer is. It might be possible to then send a request to this issuer checking if the number is valid or not. But even if you can not contact the issuer most do include a check digit at the end. So you can calculate this digit and compare it to the one the user provided. This means that even if you copy the first 8 digits from an existing credit card you only have a 1/10 chance of getting the check digit right by random. Of course you can calculate the check digit yourself so this is only a verification against typos and random numbers.
Latest Answers