Quick Start
Features
Auto Network Detection
The parser automatically detects the card network from the PAN (Field 2):- 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
- MTI Extraction: Read first 4 characters as Message Type Indicator
- Bitmap Parsing: Parse 16-character hex bitmap (64 bits)
- Secondary Bitmap: If bit 1 is set, parse additional 16 characters
- Field Parsing: For each set bit, parse the corresponding field
- Network Detection: Identify card network from PAN if present
Error Handling
- Invalid MTI format
- Malformed bitmap
- Field length exceeds maximum
- Invalid hex characters