PAN Anatomy and the 8-Digit ISO/IEC 7812 BIN Standard
Every payment card number—formally called a Primary Account Number (PAN)—follows the ISO/IEC 7812 structural specification, typically spanning 15 to 19 digits. Since April 2022, Visa and Mastercard transitioned the Issuer Identification Number (IIN), commonly known as the Bank Identification Number (BIN), from 6 to 8 digits.
Understanding this layout is essential for payment engineers, risk analysts, and media buyers configuring automated billing pipelines. A standard 16-digit PAN splits into three functional segments: the 8-digit IIN/BIN (which includes the 1-digit Major Industry Identifier, or MII), a 7-digit individual account identifier, and a 1-digit Luhn check digit at position 16.
- Major Industry Identifier (Digit 1): Defines the issuer sector. Digit 3 denotes travel and entertainment (Amex, Diners), 4 represents banking and financial (Visa), 5 covers banking and financial (Mastercard), and 6 identifies merchandising and banking (Discover, UnionPay).
- 8-Digit IIN/BIN (Digits 1–8): Pinpoints the exact issuing bank, country code (ISO 3166-1), card brand, product tier (Classic, Platinum, Corporate, Prepaid), and funding source (Debit, Credit, Charge).
- Account Identifier (Digits 9–15): Assigned internally by the issuer or BIN sponsor to uniquely identify the cardholder account or virtual card token.
- Check Digit (Digit 16): Calculated via the Luhn Mod-10 algorithm across the preceding 15 digits to catch single-digit typos and adjacent transpositions.
Expanding the BIN from 6 to 8 digits multiplied available ranges by 100, preventing prefix exhaustion as B2B fintechs and Banking-as-a-Service (BaaS) providers scaled virtual card issuance. Legacy systems that only parse 6 digits risk misclassifying co-branded or sub-BIN virtual programs under a parent bank's consumer range.
Payment Network Ranges and Card Tier Matrix
Acquiring gateways and anti-fraud filters evaluate card networks and product tiers before initiating an authorization hold. Prefix ranges determine routing rails, while the commercial vs. consumer classification dictates interchange fees and billing trust ceilings.
Major card schemes maintain distinct IIN prefix blocks, PAN lengths, and risk profiles across global acquiring networks. Corporate and Purchasing BINs consistently outperform Consumer Prepaid ranges on high-frequency recurring billing platforms.
| Payment Network | IIN / BIN Prefix Ranges | PAN Length | Key Tier Distinctions | Billing Trust Profile |
|---|---|---|---|---|
| Visa | 400000–499999 | 13, 16, 19 | Classic, Gold, Infinite, Business, Purchasing | High on Business/Corporate; restricted on Prepaid |
| Mastercard | 510000–559999; 222100–272099 | 16 | Standard, World, World Elite, Corporate, Fleet | Strong global acceptance; 2-series widely used by fintechs |
| American Express | 340000–349999; 370000–379999 | 15 | Green, Gold, Platinum, Corporate Purchasing | Strict AVS enforcement; high corporate spend limits |
| UnionPay | 620000–629999; 810000–817199 | 16–19 | Debit, Credit, Diamond, Commercial | Dominant in APAC; requires UnionPay acquiring rail |
| Discover / JCB | 6011, 644–649, 65; 3528–3589 | 16–19 | Discover It, JCB Standard/Platinum | Regional strength in US (Discover) and Japan (JCB) |
Choosing between Commercial/Business and Consumer Prepaid BINs directly impacts approval ratios on advertising platforms and cloud SaaS providers. For example, Meta Ads and Google Ads flag prepaid gift BINs (often 4000–4111 ranges issued by non-bank EMI sponsors) with immediate manual reviews, whereas Tier-1 bank Corporate Credit BINs pass initial velocity checks smoothly. You can compare live provider BIN pools in our virtual cards rating for media buying.
Luhn Mod-10 Checksum Formula with Worked Example
Hans Peter Luhn patented the Mod-10 algorithm in 1954 to detect accidental data entry errors in numerical identifiers before network transmission. Payment forms execute this deterministic check client-side and at the API gateway in under 1 millisecond, filtering out malformed PANs before incurring acquiring fees.
The formula operates from right to left, doubling every second digit starting immediately to the left of the check digit. If doubling produces a two-digit number (10 or greater), you sum its digits (equivalent to subtracting 9). Finally, the sum of all digits modulo 10 must equal zero.
Mathematically, for a 16-digit PAN with digits d1 through d16 (where d16 is the check digit), the check digit is computed from the 15-digit payload as:
S = sum(f(d_i)) for i = 1..15, where f(d_i) = (2 * d_i) - 9 if i is odd and 2 * d_i > 9, 2 * d_i if i is odd and 2 * d_i <= 9, and d_i if i is even. Then d_16 = (10 - (S mod 10)) mod 10.
Consider a worked numerical example using the 15-digit base 4532 0151 1283 036 (with unknown check digit X at position 16):
- Odd positions (1, 3, 5, 7, 9, 11, 13, 15) doubled: 4×2=8, 3×2=6, 0×2=0, 5×2=10 (1+0=1), 1×2=2, 8×2=16 (1+6=7), 0×2=0, 6×2=12 (1+2=3). Subtotal = 8+6+0+1+2+7+0+3 = 27.
- Even positions (2, 4, 6, 8, 10, 12, 14) unchanged: 5 + 2 + 1 + 1 + 2 + 3 + 3 = 17.
- Total payload sum S: 27 + 17 = 44.
- Check digit calculation: (10 - (44 mod 10)) mod 10 = (10 - 4) mod 10 = 6.
Appending 6 yields the valid 16-digit PAN 4532 0151 1283 0366, whose full sum equals 50 (50 mod 10 = 0). Note that while Luhn catches 100% of single-digit errors and nearly all adjacent transpositions (except 09 to 90), it provides zero cryptographic security against card-testing bots.
How Anti-Fraud Engines Score BIN, AVS, and 3DS 2.2
Modern payment orchestration engines combine static BIN metadata with real-time Address Verification System (AVS) responses and EMV 3D-Secure 2.2 telemetry. A mismatch between the BIN issuing country, IP geolocation, and billing address raises the transaction risk score above merchant thresholds.
AVS compares the numeric street address and postal code submitted at checkout against the cardholder record held by the issuing bank. Simultaneously, EMV 3DS 2.2 evaluates over 100 browser, device, and behavioral signals to decide between a silent Frictionless approval and an interactive Challenge.
| Protocol / Code | Verification Meaning | Acquirer Risk Impact | Recommended Handling |
|---|---|---|---|
| AVS Code Y | Exact match of street address and 5-digit ZIP/postal code | Lowest fraud risk (-15 to -25 risk points) | Auto-approve; ideal for high-ticket SaaS and ad billing |
| AVS Code A | Street address matches; ZIP/postal code does not match | Low-to-medium risk | Usually approved; verify ZIP formatting on non-US cards |
| AVS Code Z | 5-digit ZIP/postal code matches; street address does not | Low-to-medium risk | Approved by most digital merchants; watch PO Box flags |
| AVS Code N | Neither street address nor ZIP/postal code matches | High fraud risk (+40 to +60 risk points) | Auto-decline on strict US gateways; triggers 3DS Challenge |
| AVS Code U / G | AVS unavailable (U) or non-US issuer not supporting AVS (G) | Neutral on EU/APAC BINs; elevated on US BINs | Fallback to 3DS 2.2 risk scoring rather than hard decline |
| 3DS 2.2 Frictionless | Issuer ACS approves via silent device/BIN telemetry (100+ fields) | Zero friction; shifts liability to issuer | Target state for recurring billing and API subscriptions |
| 3DS 2.2 Challenge | Issuer ACS requires OTP, biometrics, or app push confirmation | Higher conversion drop-off (12%–28% abandonment) | Mandatory for PSD2 SCA in EEA unless TRA exemption applies |
Cross-border billing failures frequently happen when a European or LATAM BIN returns AVS Code G on a US merchant account configured to require Code Y. In addition, EEA transactions under PSD2 Strong Customer Authentication (SCA) enforce Challenge flows unless the acquirer holds a low fraud rate and invokes Transaction Risk Analysis (TRA) exemptions for amounts under EUR 500.
ISO 8583 Decline Diagnostics in the NW24 BIN Inspector
When a payment fails, the issuing bank returns a two-character ISO 8583 response code (Field 39) alongside network advice flags. Diagnosing whether a decline stems from BIN-level restrictions, AVS failure, or 3DS timeout prevents repeated retry loops that burn card trust.
Inspecting the 8-digit BIN before attaching a card to a billing profile eliminates most configuration errors. For a complete breakdown of Field 39 error codes, review our bank card decline codes and 3DS troubleshooting guide.
- Code 05 (Do Not Honor): Generic issuer refusal often triggered by velocity limits, BIN-level MCC blocks (e.g., crypto or gambling MCC 7995), or silent 3DS risk rejection.
- Code 14 (Invalid Card Number): Indicates a failed Luhn Mod-10 check or an unassigned 8-digit sub-BIN range not yet propagated to the acquirer's BIN table.
- Code 57 (Transaction Not Permitted to Cardholder): Hard restriction on the BIN product tier—common when attempting international SaaS or ad spend on domestic-only debit BINs.
- Code 62 (Restricted Card): Geographic or merchant-category lock on the BIN, frequently seen on single-use virtual cards tied to specific countries.
- Code 93 (Violation of Law): Regulatory compliance block triggered by sanctions screening or local central bank cross-border caps.
Checklist for Selecting a BIN for Ad Networks and SaaS
Deploying payment cards at scale requires matching the BIN country, currency, and product tier to the merchant acquirer's risk profile. Following a structured verification sequence before binding cards prevents instant account suspensions and payment holds.
- Validate 8-Digit BIN Metadata: Run the first 8 digits through the NW24 BIN Inspector to confirm the exact issuing bank, ISO country code, and card scheme rather than relying on legacy 6-digit tables.
- Prioritize Commercial or Corporate Tiers: Select Corporate, Business, or Purchasing Credit BINs for Google Ads, Meta Ads, and AWS/GCP billing; avoid Consumer Prepaid ranges with low trust ceilings.
- Align BIN Country with Billing Geo: Match the issuer country code to your business entity or billing profile IP (for example, US BINs with US EIN profiles and US residential/datacenter billing addresses).
- Verify AVS Support for US/UK Gateways: Confirm that the card issuer supports full street and ZIP registration (AVS Code Y) before linking to Stripe, PayPal, or US ad accounts.
- Check 3DS 2.2 Enrollment and App Access: Ensure the virtual card platform routes 3DS Challenge requests to an accessible webhook, API endpoint, or team dashboard rather than an unmonitored SMS number.
- Monitor BIN Cleanliness and Spend History: Avoid overused public BINs shared across thousands of flagged arbitrage accounts; test fresh sub-BINs with small USD 5–20 authorization holds first.
Common pitfalls include binding non-reloadable gift BINs to recurring SaaS subscriptions, triggering ISO 8583 Code 57 on restricted MCCs, and retrying hard declines (Codes 14 or 57) more than twice—which signals automated card testing to acquiring fraud engines.