BIN/IIN look up
Lookup card BIN numbers using https://www.binlist.net
IIN (Issuer Identification Number) is the more modern name.
Useful for querying information from a credit card such as:
- brand (Visa, MasterCard, American Express, etc.)
- type (debit or credit)
- category (prepaid or classic)
- issuing bank
What is a BIN?
The BIN is the first 4-8 characters of a card number:
0000 0000 **** ****.
You can pass any range of 4-8 numbers. More numbers will return more
Works in browser environments using Browserify or similar.
// with an API keyvar b = 'my-api-key';// without API keyvar b = ;;// using promises;
bin: "45717360"brand: "VISA"sub_brand: "DANKORT"country_code: "DK"country_name: "Denmark"bank: "Jyske Bank"card_type: "DEBIT"card_category: "CLASSIC"latitude: "56"longitude: "10"query_time: "352.309µs"
You should never process or store more than the first 8 characters of a card number unless you are PCI compliant and has the appropriate knowledge.
The string is always truncated to eight characters before it is sent to the binlist service.
This script comes without any warranties or guarantees, use it at your own risk.
You can cache the response using AsyncCache or similar:
var binlookup = ;var AsyncCache = ;var cache =load:;cache;