Search code examples
e-commercecredit-card

Determine credit card type by number?


Can credit card type be determined solely from the credit card number?

Is this recommended or should we always ask client for the type of credit card they're using?

I Googled about it and found this algorithm: http://cuinl.tripod.com/Tips/o-1.htm , is this reliable?


Solution

  • Yes, the site you mentioned is correct. Many sites, incl. Google Checkout I believe, rely on automatic detection of the card type. It's convenient, makes the UI less cluttered (one less input box) and saves time. Go ahead!