tags:

views:

2127

answers:

2

Is there a way we can find the name of the bank from the details that we get after scanning a card?

The only relevant info seems to be Card type - Visa etc and the last four digits of the account number.

+11  A: 

Yes, you can. We had to do this a while back for an e-commerce application we wrote.

The first 6 digits of a credit card is known as the Bank Identification Number (or BIN). Some credit card processing gateways can return this information, or you can do it yourself. There are public databases with this information stored for each card type: VISA, MasterCard, AMEX, etc.

This link shows some of the common BINs: http://en.wikipedia.org/wiki/List_of_Bank_Identification_Numbers

And this link explains this concept to a little better depth: http://mediakey.dk/~cc/bank-identification-number-bin-database/

Hope this helps!

mbmccormick
+1  A: 

The first six numbers identify the card type and bank. In America we tend to take the short cut of the first number to identify card type, but in fact the first four identify the exact card issuing company and the bank is further identified by the last two (card types with more than 100 banks will have more than one set of numbers in the first four). All six numbers identify the bank exactly. Pace mbmccormick, though, this list is not regarded as public information, and if you wanted to get an authoritative list you would have to pay for it and only get it with confidentiality agreements.

However, enough of the information has been collected and identified publicly that you can get an approximate answer from publicly available BIN databases. This is especially true if the individual bank is not your greatest concern (that is you are not looking to call them or validate that the card holder can correctly identify the bank based on the bin number) but rather you want to make sure that the card is issued in the same country as the card holder claims (or wants to ship to).

Yishai
Actually some smaller banks use more than 6 digits for a complete ID; they are assigned a sub-block from a larger card issuer. These banks are sometimes in different jurisdictions, so don't rely on just the first 6; a recent payment server I worked on used 9 or 10 digit begin/end ranges.
devstuff
And if you're looking for a credit card fraud detection service try MaxMind: http://www.maxmind.com/app/ccv_overview
devstuff
@devstuff - that is interesting. I assume you mean a larger bank subcontracted out some of their block to smaller banks. But does a database that goes to 10 numbers exist? CC fraud software I have seen tends to assume it is checking on the first 6 numbers. 10 numbers could lead to serious PCI issues in some cases (you store the BIN number unencrypted, you store the last 4 unencrypted, so there are only one or two numbers hidden if the BIN is potentially 10 numbers).
Yishai

related questions