ISO/IEC 7813
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
(Learn how and when to remove this template message)
|
ISO/IEC 7813 is an international standard codified by the International Organization for Standardization and International Electrotechnical Commission that defines properties of financial transaction cards, such as ATM or credit cards.[1]
ScopeEdit
The standard defines:[citation needed]
- physical characteristics, such as size, shape, location of magnetic stripe, etc.
- magnetic track data structures
Physical characteristicsEdit
ISO/IEC 7813 specifies the following physical characteristics of the card, mostly by reference to other standards:[citation needed]
- Embossed characters
- by reference to ISO/IEC 7811
- Embossing of expiration date
- the format (MM/YY or MM-YY)
- Magnetic stripe
- by reference to ISO/IEC 7811
- Integrated circuit with contacts
- by reference to ISO/IEC 7816-1
- Integrated circuit without contacts
- by reference to ISO/IEC 10536-1, ISO/IEC 14443-1, and ISO/IEC 15693-1
Magnetic tracksEdit
Track 1Edit
The Track 1 structure is specified as:[citation needed]
- STX : Start sentinel "%"
- FC : Format code "B" (The format described here. Format "A" is reserved for proprietary use.)
- PAN : Payment card number 4400664987366029, up to 19 digits
- FS : Separator "^"
- NM : Name, 2 to 26 characters (including separators, where appropriate, between surname, first name etc.)
- FS : Separator "^"
- ED : Expiration data, 4 digits or "^"
- SC : Service code, 3 digits or "^"
- DD : Discretionary data, balance of characters
- ETX : End sentinel "?"
- LRC : Longitudinal redundancy check, calculated according to ISO/IEC 7811-2
The maximum record length is 79 alphanumeric characters.
ExamplesEdit
%B4815881002867896^YATES/EUGENE JOHN ^37829821000123456789?
%B4815881002861896^YATES/EUGENE L ^^^356858 00998000000?
Track 2Edit
The Track 2 structure is specified as:[citation needed]
- STX : Start sentinel ";"
- PAN : Primary Account Number, up to 19 digits, as defined in ISO/IEC 7812-1
- FS : Separator "="
- ED : Expiration date, YYMM or "=" if not present
- SC : Service code, 3 digits or "=" if not present
- DD : Discretionary data, balance of available digits
- ETX : End sentinel "?"
- LRC : Longitudinal redundancy check, calculated according to ISO/IEC 7811-2
The maximum record length is 40 numeric digits (e.g., 5095700000000).[citation needed]
Track 3Edit
Track 3 is virtually unused by the major worldwide networks and often isn't even physically present on the card by virtue of a narrower magnetic stripe.[citation needed]
A notable exception to this is Germany, where Track 3 content was used nationally as the primary source of authorization and clearing information for debit card processing prior to the adoption of the "SECCOS" ICC standards. Track 3 is standardized nationally to contain both the cardholder's bank account number and branch sort code (BLZ).[citation needed]
ProgrammingEdit
Parsing Track 1 and Track 2 can be done with Regular Expressions.
Track 1Edit
^%B([0-9]{1,19})\^([^\^]{2,26})\^([0-9]{4}|\^)([0-9]{3}|\^)([^\?]+)\?$
This Regex will capture all of the important fields into the following groups:[citation needed]
- Group 1: Payment card number (PAN)
- Group 2: Name (NM)
- Group 3: Expiration Date (ED)
- Group 4: Service Code (SC)
- Group 5: Discretionary data (DD)
Track 2Edit
^\;([0-9]{1,19})\=([0-9]{4}|\=)([0-9]{3}|\=)([^\?]+)\?$
- Group 1: Primary Account Number (PAN)
- Group 2: Expiration date (ED)
- Group 3: Service code (SC)
- Group 4: Discretionary data (DD)