Credit Card checksums and validations that do not require connection to the financial institution

Posted by cjavapro on Stack Overflow See other posts from Stack Overflow or by cjavapro
Published on 2010-12-22T22:47:50Z Indexed on 2010/12/22 22:54 UTC
Read the original article Hit count: 199

The validations I know of are:

  • Checksum the whole card number should add up to zero. (range is 0-9)
  • Check the first digit(s) against the card type
  • Check the length against the card type
  • Check the CCV length against the card type (I think all the major types are 3 anyway)
  • Of course make sure it is accepted card type as well as non expired.

Are there any other validations :) (I expect many folks did not know about all of these)

The reason I ask is because I overheard there was one to checksum number against expiration or CCV.. I just wanted to check.

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about validation