On this page
Every card payment arrives with a small piece of free information: the first digits of the card number. Those digits identify the issuing institution and, through lookup data, usually tell you the card's scheme, its type, its category and the country where it was issued. That is enough to make better routing decisions and to catch some obvious risk before a payment ever reaches a PSP.
This article explains what BIN data is, what you can reasonably infer from it, where it goes wrong, and how to use it for routing and risk without treating it as more reliable than it is.
What a BIN is
BIN stands for Bank Identification Number. The formal term is IIN, Issuer Identification Number, but the industry still says BIN. It is the leading set of digits on a payment card. The first digit hints at the industry, and the scheme is usually recognisable from the opening digits: Visa cards start with 4, for example, and Mastercard uses ranges starting with 5 and 2.
Historically the BIN was six digits long. As the number of issuers and card programmes grew, the standard moved to eight-digit BINs. In practice this means:
- Your systems should store and compare BINs as strings of variable length, not as a fixed six-digit field.
- A six-digit prefix may now be shared by several issuers or programmes that differ at digits seven and eight.
- Lookup tables and rule lists written for six digits may need reviewing.
A BIN range is also common: an issuer may own a block of numbers, and rules often target the range rather than a single prefix.
What you can infer from a BIN
A BIN lookup maps the prefix to attributes published or compiled for that range. The usual ones are:
- Scheme or brand, such as Visa, Mastercard, Amex or a domestic scheme like mada.
- Card type: debit, credit or prepaid.
- Category or level: for example consumer, business, corporate, or a product tier.
- Issuer country, and sometimes the issuer's name.
What a BIN does not tell you is just as important. It does not tell you who the cardholder is, where they are right now, whether the card is valid, or whether it has funds. It is a description of the card programme, not of the person using it.
Data quality, freshness and caching
BIN data has real limits, and anyone building on it should plan for them.
Coverage gaps. No source has every range. New programmes appear, and some issuers publish little.
Staleness. Ranges are reassigned, issuers merge, and products change. A table that was right last year may be wrong today.
Conflicts. Different sources can disagree, especially on category and issuer name.
Co-badged cards. A card that carries both a domestic and an international scheme may be described differently depending on the source.
Because lookups are frequent and the answer for a given prefix rarely changes from one minute to the next, caching is standard. A sensible pattern is an in-memory cache in front of a database store, with an external lookup only when both miss. Each result should carry its source and when it was fetched, so that rules can distinguish verified data from best-effort data. When a lookup fails, the routing or risk decision should fall back to a safe default rather than blocking the payment outright.
Using BIN data for routing
Routing is where BIN data earns its keep. Common patterns:
- Domestic vs cross-border. Compare the issuer country with your merchant country. Domestic cards can go to an account with local acquiring; foreign cards to a provider with strong cross-border coverage. In Saudi Arabia this often means separating mada from international cards, as covered in payment orchestration in Saudi Arabia.
- Scheme-specific accounts. Some accounts are only enabled for certain schemes. Routing on scheme avoids sending a card to an account that cannot process it.
- Debit vs credit. Pricing and approval behaviour can differ by card type, so cost-based routing often branches here.
- Commercial cards. Business and corporate cards may be priced differently and suit a different account.
Rules should always have a default branch for unknown or unverified BIN data. For a broader look at how rule-based and data-driven routing fit together, read how intelligent routing works, and try BIN conditions in the routing simulator.
Using BIN data for risk
BIN data is also a cheap early risk signal, though not a decisive one on its own.
- Allow and block lists. Block ranges you have seen abused, or restrict a channel to specific ranges, such as a corporate programme.
- Country mismatch. A card issued in one country, used from an IP address in another, for delivery to a third, is worth a closer look. Travellers and expatriates create legitimate mismatches, so treat this as a signal to weigh, not an automatic decline.
- Prepaid cards. Some merchants apply tighter limits to prepaid cards on high-risk goods.
Keep these rules visible and reviewable. A broad block on a range can quietly turn away good customers, and the only way to notice is to watch the outcomes.
Privacy and handling
A BIN alone does not identify a cardholder, and it is not the full card number. It is still derived from one, and combined with the last four digits and other fields it narrows things down. Good practice:
- Extract the BIN where card data is captured and pass only what downstream systems need.
- Never log full card numbers or CVV, and mask card data in logs and captured API calls.
- Restrict who can view and export BIN-level reports.
- Avoid sending BINs to third-party lookup services unless you have decided that is acceptable.
How Meem approaches this
In Meem, BIN data feeds both routing and risk. Meem Routing conditions can match on card BIN or BIN range, and on BIN-intelligence fields: issuer country, card type and card category. The Routing Studio also has a risk-block terminal for flows that should stop before reaching a PSP.
Meem Risk includes BIN allow and block rules alongside country, IP-country, velocity and amount rules. Blocked payments return RISK_BLOCKED and record a risk event.
The lookup chain is deliberately simple: an in-memory cache, then a database cache, then an optional call to binlist.net. That external lookup is off by default, rate-limited, and its results are marked unverified. Meem does not use a commercial BIN feed today, so coverage and accuracy depend on what you configure. ML scoring and device fingerprinting are planned, not available. PAN and CVV are redacted in logs and captured API calls; more on our controls is on the security page.