Reputation: 25297
I'm trying to develop an application, which would give access to different services for people from different regions of the world.
Let's say, someone enters card number 1111-1111-1111-1111 . How do I use it to tell the country of origin?
I know that this is possible, because paypal and apple do it.
Upvotes: 24
Views: 105693
Reputation: 475
checkout https://binlist.io/ opensource and it looks like they have a maintained csv file on their github page: https://github.com/iannuttall/binlist-data
Upvotes: 4
Reputation: 808
Use BinList. It simply tells you the country of origin by checking the first 6 digits of the card number. It has a neat Json based API as well.
Upvotes: 37
Reputation: 1541
At first, I questioned whether this information could be gleened from the credit card number alone.
Then I found it here:
http://en.wikipedia.org/wiki/List_of_Bank_Identification_Numbers
Edit - Don't forget about PCI Compliance if you are taking credit card numbers for payment.
Edit - Apparently the previous wikipedia page has been deleted. This appears to have similar information.
Upvotes: 5