INFORMATION
 
FILES / DOWNLOADS
 
KNOWLEDGE BASE
 
CARD STANDARDS (ISO 7812, MII, LUHN)

Technical Reference: Card Number Structure & Standards

Identification and processing of payment cards are governed by international standards that ensure interoperability between banks, networks, and merchants. This guide covers the core components of the Primary Account Number (PAN).

1. ISO/IEC 7812 Standard

The ISO/IEC 7812 standard regulates the numbering system for all identification cards used in international exchange. A standard card number (PAN) consists of three main parts:

Component Description
IIN / BIN Issuer Identification Number (formerly BIN). The first 6 or 8 digits that identify the network and the issuing bank.
Individual Account ID A unique number assigned by the issuer to identify the specific customer account.
Check Digit The final digit, calculated using the Luhn algorithm to verify the validity of the number.

2. Major Industry Identifier (MII)

The first digit of the IIN is the MII, which indicates the primary industry of the card issuer:

1-2 Airlines (e.g., UATP) 6 Merchandising and Banking (Discover, China UnionPay)
3 Travel and Entertainment (American Express, JCB, Diners Club) 7 Petroleum
4 Banking and Financial (Visa) 8 Healthcare and Telecommunications
5 Banking and Financial (Mastercard, Maestro) 9 National Use (Local government standards)

3. Luhn Algorithm (Mod 10)

The Luhn algorithm is a simple checksum formula used to validate card numbers against accidental errors (typos). It is not a security feature, but a data integrity tool.

Reference Implementation (Python)
def is_luhn_valid(card_number):
    digits = [int(d) for d in str(card_number)]
    checksum = 0
    reverse_digits = digits[::-1]
    
    for i, digit in enumerate(reverse_digits):
        if i % 2 == 1:
            digit *= 2
            if digit > 9:
                digit -= 9
        checksum += digit
        
    return checksum % 10 == 0

Note on 8-Digit BIN Transition

As of April 2022, the industry has officially migrated to an 8-digit BIN standard to expand the available pool of issuer identifiers. Our database supports both legacy 6-digit and new 8-digit ranges to ensure zero transaction friction.

Explore Comprehensive BIN Data