Skip to main content

Quick Start

Features

Auto Network Detection

The parser automatically detects the card network from the PAN (Field 2):
Network detection is based on PAN prefixes:
  • VISA: 4xxx
  • Mastercard: 51-55, 2221-2720
  • AMEX: 34, 37
  • Discover: 6011, 644-649, 65
  • JCB: 3528-3589
  • UnionPay: 62

Manual Network Specification

Override auto-detection by specifying the network:

Version Support

EMV Data Parsing

Field 55 (ICC Data) is automatically parsed into a dictionary:

Object Pooling

For high-throughput scenarios:

Parsing Process

  1. MTI Extraction: Read first 4 characters as Message Type Indicator
  2. Bitmap Parsing: Parse 16-character hex bitmap (64 bits)
  3. Secondary Bitmap: If bit 1 is set, parse additional 16 characters
  4. Field Parsing: For each set bit, parse the corresponding field
  5. Network Detection: Identify card network from PAN if present

Error Handling

Common errors:
  • Invalid MTI format
  • Malformed bitmap
  • Field length exceeds maximum
  • Invalid hex characters

API Reference

See Core API Reference for complete API documentation.