# What Is a BIN Number? Bank Identification Numbers Explained

> A BIN number is the first 6 to 8 digits of a payment card. Learn what BINs reveal, the move to 8-digit BINs, and how merchants use BIN data for fraud, routing and pricing.
- **Author**: Deepak Jangir
- **Published**: 2026-11-05
- **Category**: Payments, Fraud Prevention
- **URL**: https://dodopayments.com/blogs/en/bin-number

---

A BIN number (bank identification number) is the first six to eight digits of a payment card number. It identifies the institution that issued the card and tells a payment system the card's network, type (credit, debit or prepaid), product level (for example, consumer or commercial) and issuing country. The same digits are also called the **IIN** (issuer identification number), which is the term used in the ISO/IEC 7812 standard that governs card numbering.

Merchants never see a "BIN field" at checkout, but BIN data shapes a lot of what happens after a customer types their card: which network routes the payment, which interchange rate applies, whether a fraud rule fires, and whether a prepaid card is allowed on a subscription. This guide explains how BINs are structured, what changed with 8-digit BINs, and how online businesses use BIN data in practice.

## How a Card Number Is Structured

A card number, formally the **primary account number (PAN)**, is usually 15 or 16 digits, though the standard allows up to 19. It breaks down into three parts:

```mermaid
flowchart LR
    A["Digit 1
Major Industry Identifier"] --> B["Digits 1-6 or 1-8
BIN / IIN"]
    B --> C["Middle digits
Individual account number"]
    C --> D["Last digit
Luhn check digit"]
```

- **Major Industry Identifier (MII):** the first digit. It indicates the industry category of the issuer.
- **BIN / IIN:** the first six or eight digits, including the MII. It identifies the issuer and card product.
- **Account number:** the digits that identify the individual cardholder account.
- **Check digit:** the final digit, calculated with the Luhn algorithm so that typos can be caught before a payment is even sent.

The first digit alone hints at the network:

| Leading digits | Typical network |
| --- | --- |
| 4 | Visa |
| 51-55 and 2221-2720 | Mastercard |
| 34, 37 | American Express |
| 6011, 644-649, 65 | Discover |
| 62 | UnionPay |
| 3528-3589 | JCB |

These ranges are why a checkout form can show the Visa or Mastercard logo after you type the first few digits.

## What Information Does a BIN Reveal?

A BIN lookup, run against a BIN database maintained by your processor or a data provider, typically returns:

| Attribute | Example values | Why merchants care |
| --- | --- | --- |
| Card network | Visa, Mastercard, Amex | Routing and acceptance rules |
| Issuer | The issuing bank's name | Support conversations, issuer-specific decline patterns |
| Card type | Credit, debit, prepaid | Surcharging rules, subscription risk |
| Product level | Consumer, business, corporate, purchasing | Interchange rates and B2B data programs |
| Issuing country | US, GB, IN | Fraud signals, cross-border fees, local regulation |
| Regulated status | Regulated or exempt debit (US) | Debit interchange caps |

A BIN does **not** reveal the cardholder's name, balance or account details. It describes the card product, not the person.

## The Move From 6-Digit to 8-Digit BINs

For decades BINs were six digits. As card programs multiplied, the six-digit space ran short, so ISO updated the IIN standard to support eight-digit identifiers. Visa and Mastercard set an April 2022 deadline for the industry to support 8-digit BINs, and issuers now receive new ranges in the 8-digit format.

What this means for merchants and developers:

- **Do not hardcode six-digit BIN logic.** Rules that block or allow ranges based only on the first six digits can misclassify cards from newer 8-digit ranges.
- **Card truncation rules changed.** PCI guidance allows displaying the first eight and last four digits for 16-digit PANs from issuers using 8-digit BINs, while other cases remain at first six and last four. If you store truncated numbers, confirm which format your provider returns.
- **BIN databases must be current.** Old datasets miss newer ranges, which shows up as "unknown issuer" results.

If you use a hosted checkout or tokenizing payment provider, most of this is handled for you. It matters most if you built your own fraud rules or reporting on raw BIN prefixes.

## How Merchants Use BIN Data

### Fraud screening

BIN data is one of the cheapest fraud signals available. Common checks include:

- **BIN country vs IP or billing country.** A card issued in one country used from an IP address in another is not proof of fraud, since people travel and use VPNs, but combined with other signals it raises risk.
- **Prepaid cards on high-risk products.** Prepaid cards are harder to trace, and fraudsters favor them for [card testing](https://dodopayments.com/blogs/card-testing-fraud).
- **BIN velocity.** Many attempts from cards sharing one BIN in a short window often signal a BIN attack, where fraudsters generate card numbers within a known range and test them.

Our guide to [chargeback fraud prevention](https://dodopayments.com/blogs/chargeback-fraud-prevention) shows how BIN checks fit with CVV, AVS and 3D Secure.

### Subscription and trial risk

Prepaid and some virtual cards are often used to start free trials that will fail at the first renewal. Some SaaS businesses use BIN data to require a different card for trials, or to skip trials for prepaid cards, which reduces [involuntary churn from failed payments](https://dodopayments.com/blogs/involuntary-churn-failed-payments). The trade-off is friction for legitimate prepaid users, so measure before blocking.

### Routing and acceptance

Processors use BIN data to pick the right network and, for debit cards in some markets, the least expensive eligible network. Payment orchestration tools also route by BIN country to a local acquirer, which can improve approval rates on cross-border cards. Our [smart payment routing guide](https://dodopayments.com/blogs/smart-payment-routing) covers how this works.

### Pricing and fees

Interchange depends heavily on card type and product level, which come from the BIN. A US consumer debit card, a rewards credit card and a corporate purchasing card can carry very different interchange rates on the same transaction. BIN data is also how processors determine whether a card is foreign, which triggers cross-border fees. Our [interchange fees explainer](https://dodopayments.com/blogs/interchange-fees-explained) and guide to [Level 2 and Level 3 processing](https://dodopayments.com/blogs/level-2-level-3-credit-card-processing) show how card product level affects B2B rates.

### Surcharging compliance

In the US, merchants that [surcharge credit cards](https://dodopayments.com/blogs/credit-card-surcharging) may not surcharge debit cards, including prepaid. BIN data is how a checkout tells the two apart, which is why surcharging programs depend on reliable BIN lookups.

## BIN Attacks: What They Are and How to Spot Them

A BIN attack (sometimes called BIN enumeration) uses a known valid BIN to generate many possible card numbers, each passing the Luhn check, and then submits them as small payments to find which are real. Signs include:

- A spike in declined payments, especially for "invalid card number" or "incorrect CVV"
- Many attempts with cards from the same BIN or issuer in minutes
- Repeated small-amount attempts on your cheapest product or a donation form
- Unusual traffic from a narrow set of IP addresses or user agents

Defenses include rate limiting checkout attempts, CAPTCHA or bot detection, requiring CVV and AVS, and blocking repeated failures per device. Payment providers with network-wide visibility catch these patterns faster than an individual merchant can.

## BIN Lookup for Developers

If you handle card data yourself, you can run BIN lookups against your processor's data. If you use a hosted checkout, you typically get BIN-derived attributes (brand, funding type, country) in the payment object without ever touching the card number, which keeps you out of PCI scope.

With [Dodo Payments](https://dodopayments.com), card numbers are tokenized on entry and fraud scoring runs in real time on every payment, so BIN-level checks are part of the risk engine rather than something you build. The [cards documentation](https://docs.dodopayments.com/features/payment-methods/cards) lists the protections applied to every card payment.

You still get the BIN-derived attributes for your own analytics. The payment object returned by the [Get Payment API](https://docs.dodopayments.com/api-reference/payments/get-payments-1) includes `card_network`, `card_type` (`credit`, `debit` or `prepaid`) and `card_issuing_country`, along with the last four digits, so you can segment trial conversion or failed renewals by card type without ever seeing the full card number:

```javascript
// Read BIN-derived card attributes from a payment (no raw card data needed)
const payment = await client.payments.retrieve('pay_abc123');

const card = {
  network: payment.card_network,          // e.g. 'visa'
  type: payment.card_type,                // 'credit' | 'debit' | 'prepaid'
  issuingCountry: payment.card_issuing_country,
  last4: payment.card_last_four,
};

// Example: tag prepaid-card trials so you can measure their renewal rate
if (card.type === 'prepaid' && payment.subscription_id) {
  await tagSubscription(payment.subscription_id, 'prepaid_card');
}
```

Pair this with the `payment.failed` and subscription events described in the [webhooks guide](https://docs.dodopayments.com/developer-resources/webhooks) to see whether a particular card type or issuing country drives failed renewals.

## How to Read a BIN Lookup Result

Suppose your fraud review shows a failed payment from a card whose BIN lookup returns "Visa, debit, prepaid, consumer, issuing country: US", while the customer's IP address is in another country and they are starting a free trial. No single attribute is decisive, but the combination tells a story: a prepaid card, a geography mismatch and a trial are all individually common among legitimate users, yet together they match the profile of trial abuse. The right response is usually friction (require 3D Secure or a different card), not an outright ban.

Contrast that with a BIN lookup returning "Mastercard, credit, corporate, issuing country: DE" on an annual plan from a German IP. That is a business buyer paying with a company card, the kind of customer you want to remove friction for. BIN data is most useful when it shifts how much scrutiny a payment gets, rather than acting as a hard allow or block list.

## BIN vs IIN vs MID vs PAN

These acronyms are easy to confuse:

| Term | What it identifies | Who assigns it |
| --- | --- | --- |
| BIN / IIN | The card issuer and product | Card networks, under ISO/IEC 7812 |
| PAN | The full card number | The issuing bank |
| [MID (merchant ID)](https://dodopayments.com/blogs/merchant-id) | The merchant's account with an acquirer | The acquirer or processor |
| [MCC](https://dodopayments.com/blogs/merchant-category-code-mcc) | The merchant's business category | Assigned to the merchant account |

BIN is about the card side of the transaction. MID and MCC are about the merchant side. Our explainer on [acquiring banks vs issuing banks](https://dodopayments.com/blogs/acquiring-bank-vs-issuing-bank) shows where each sits in the payment flow.

## FAQ

### What is a BIN number on a credit card?

It is the first six to eight digits of the card number. It identifies the issuing bank and describes the card's network, type, product level and issuing country. It is also known as the issuer identification number (IIN).

### Is a BIN number the same as a routing number?

No. A BIN identifies a card issuer and card product within a card number. A routing number is a nine-digit code that identifies a US bank for ACH and wire transfers, and it is not part of a card number.

### Can someone use my BIN number to steal money?

A BIN alone is not sensitive, because it is shared by many cards from the same issuer and product. Fraudsters use BINs as a starting point to generate and test possible card numbers, which is why merchants watch for many failed attempts within the same BIN.

### Why did BINs change from 6 to 8 digits?

The six-digit range was running out as issuers launched more card programs. The ISO standard was updated to support eight-digit issuer identifiers, and Visa and Mastercard required industry support by April 2022.

### Should I block prepaid card BINs?

Only if data shows prepaid cards drive fraud or failed renewals for your product. Blocking them outright can turn away legitimate customers, so many businesses only restrict prepaid cards on free trials or high-risk products.

## Conclusion

A BIN number is the prefix of every card number, and it tells your payment stack who issued the card, what kind of card it is and where it comes from. Merchants use that information for fraud screening, trial and subscription risk, routing, interchange and surcharging compliance. Keep rules compatible with 8-digit BINs, treat BIN signals as one input among many, and let a tokenizing provider handle the raw card data. To accept cards with fraud scoring built in, see [Dodo Payments pricing](https://dodopayments.com/pricing).
---
- [More Payments articles](https://dodopayments.com/blogs/category/payments)
- [All articles](https://dodopayments.com/blogs)