BIN

Also known as: Bank identification number · IIN

On this page 7

A BIN, short for bank identification number and formally called the IIN (issuer identification number), is the leading block of digits on a payment card that identifies the card network and the issuing institution. In e-commerce payment security, the BIN is the first piece of card data that merchants, gateways and fraud tools read, because it reveals the issuer, country, card type and product level before any authorization takes place.

The BIN does not identify the cardholder and is not secret on its own. Its value lies in the metadata it unlocks through BIN databases, which feed routing decisions, fraud screening rules and checkout logic.

How the BIN is structured within a card number

A payment card number, the primary account number (PAN), follows the international standard ISO/IEC 7812. The PAN usually has 15 to 19 digits and contains three parts: the BIN at the start, an individual account identifier in the middle and a check digit at the end calculated with the Luhn algorithm.

ComponentPositionPurpose
Major industry identifierFirst digitIndicates the industry, for example 4 and 5 for banking and finance
BIN or IINFirst 6 or 8 digitsIdentifies network, issuer and card program
Account identifierFollowing digits up to the lastIdentifies the individual account
Check digitLast digitDetects typing errors through the Luhn formula
Components of a typical 16-digit card number

Historically, BINs were six digits long. Because the supply of six-digit ranges was running out, the 2017 revision of ISO/IEC 7812 introduced eight-digit BINs, and the major networks began issuing them broadly around April 2022. Systems that still assume six digits may misclassify cards, so modern BIN lookups should accept both lengths.

What a BIN lookup reveals

A BIN lookup maps the leading digits to issuer attributes stored in tables maintained by card networks and commercial data providers. Merchants rarely see the official network tables directly; they usually consume them through their payment gateway or processor, which refreshes the data regularly.

AttributeExample valueHow it is used
Card networkVisa, Mastercard, American ExpressRouting, logo display, fee calculation
Issuing bankName of the issuerSupport contact, issuer-specific rules
Issuing countryCountry code of the issuerGeographic risk checks, cross-border fees
Funding typeCredit, debit, prepaidFraud rules, payment method restrictions
Product levelClassic, premium, commercialInterchange cost, corporate card handling
Regulatory flagsStrong authentication requirementsDeciding whether to request 3-D Secure
Typical attributes returned by a BIN lookup

Leading digits also indicate the network without any lookup: Visa cards start with 4, Mastercard uses 51 to 55 and 2221 to 2720, and American Express uses 34 and 37. Checkout forms rely on this to show the correct card logo while the shopper types.

The role of the BIN in fraud screening

The BIN is a core input for fraud screening and fraud risk scoring because it supplies context that the shopper cannot easily falsify. A strong signal is a BIN country mismatch, where the issuing country differs sharply from the billing address, shipping address and IP location.

SignalWhat it may indicateTypical response
Country mismatchStolen card used from abroadRaise risk score, request 3-D Secure
Prepaid card on high-value orderAnonymous funding to avoid traceabilityManual review or order limit
Many attempts from one BIN rangeCard testing or BIN attackVelocity check and temporary block
BIN with high chargeback historyWeak issuer controlsStricter rules for that range
Corporate card on consumer goodsPossible misuse of a company cardAdditional verification
Common BIN-based fraud signals

A particular threat is the BIN attack, a form of card testing in which criminals take a known BIN and generate the remaining digits, often with valid Luhn check digits, then submit small authorization attempts until some succeed. Defenses include velocity limits per BIN range, CAPTCHA on repeated failures and monitoring of decline ratios. The BIN alone never proves fraud; it should be one feature among many.

BIN data in payment routing and checkout

Beyond fraud prevention, BIN data supports payment optimization. Merchants with several acquirers can route a transaction to a local acquirer in the issuing country, which often improves approval rates and lowers cross-border fees. In regions where debit cards carry more than one network, the BIN helps determine which network can process the payment at the lowest cost.

  • Surcharging rules: some jurisdictions forbid surcharges on debit cards, so the funding type from the BIN decides what may be charged.
  • Payment method eligibility: subscriptions may reject prepaid cards that cannot support recurring charges.
  • Strong customer authentication: the issuer region helps determine whether 3-D Secure is required under rules such as PSD2 in Europe.
  • Network tokenization: tokens keep a BIN-like prefix so routing and analytics still work.

BIN handling under PCI DSS and common mistakes

Under PCI DSS, the BIN is part of the PAN, but the standard permits displaying a truncated number that shows the leading digits and the last four digits. Version 4 recognizes that eight-digit BINs require showing up to the first eight digits in certain cases, subject to the rules of each card brand. Storing the BIN separately for analytics is generally acceptable, while storing the full PAN brings the system into full PCI scope.

MistakeConsequenceFix
Hard-coded six-digit logicWrong issuer or card typeSupport six- and eight-digit lookups
Outdated BIN tablesNew ranges misclassifiedRefresh data at least monthly
Blocking whole countries by BINLost legitimate salesCombine BIN with other signals
Treating BIN as cardholder identityWrong fraud conclusionsUse it only as issuer context
Frequent BIN mistakes and their fixes

The idea in brief

The first few digits of a payment card work like the area code of a phone number. They do not say who owns the card. They do tell an online store which bank issued it and in which country. They also show whether it is a credit, debit or prepaid card.

Stores use this information to spot suspicious orders. A card from one country used with an address on another continent looks odd. The digits also help send the payment along the cheapest and most reliable path.

A practical scenario

A mid-sized online electronics retailer notices that over one night its checkout receives several thousand $1 authorization attempts, almost all declined. The payment team groups the attempts by BIN and finds that most of them share the same eight-digit prefix, a classic sign of a BIN attack in which fraudsters generate card numbers and test which ones are live.

The team adds a velocity rule that allows only a small number of failed attempts per BIN range per hour and requires a CAPTCHA after two declines. It also enables 3-D Secure for any order where the BIN country differs from both the IP and shipping country. Within a day, the testing traffic stops, the decline ratio returns to normal and the retailer avoids penalties for excessive authorization failures.