Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How tell the difference between a Debit Card and a Credit Card

How does one determine that the card a person is entering is a debit card, check card, or credit card?

I am looking at this for web payments in the US only. This is for utility billing.

like image 987
Mike Wills Avatar asked Sep 25 '09 20:09

Mike Wills


1 Answers

The best code I've seen for checking a card type is a Javascript page at http://www.eflo.net/mod10.htm - can differentiate between a VISA Debit and Credit card as you requested, a long with many other variations of cards. I've ported this code to C# very easily.

Your other alternative is to acquire a copy of the BIN (Bank Identification Number) database, which is a list of all card prefixes, the card issue, and the card validation requirements (e.g. Expiry Date, Issue No, Start Date). Some BIN sources;

  • Wikipedia has a free incomplete list at http://en.wikipedia.org/wiki/List_of_Bank_Identification_Numbers
  • BINBase is a commercial list - http://www.binbase.com/
like image 97
Ollie Avatar answered Oct 27 '22 03:10

Ollie