ISO/IEC 7813
   HOME

TheInfoList



OR:

ISO/IEC 7813 is an international standard codified by the
International Organization for Standardization The International Organization for Standardization (ISO ) is an international standard development organization composed of representatives from the national standards organizations of member countries. Membership requirements are given in A ...
and
International Electrotechnical Commission The International Electrotechnical Commission (IEC; in French: ''Commission électrotechnique internationale'') is an international standards organization that prepares and publishes international standards for all electrical, electronic and ...
that defines properties of financial transaction cards, such as ATM or
credit cards A credit card is a payment card issued to users (cardholders) to enable the cardholder to pay a merchant for goods and services based on the cardholder's accrued debt (i.e., promise to the card issuer to pay them for the amounts plus the ...
.ISO/IEC 7813:2006 Information technology -- Identification cards -- Financial transaction cards
/ref>


Scope

The standard defines: * physical characteristics, such as size, shape, location of magnetic stripe, etc. * magnetic track data structures


Physical characteristics

ISO/IEC 7813 specifies the following physical characteristics of the card, mostly by reference to other standards: ; Embossed characters : by reference to
ISO/IEC 7811 ISO/IEC 7811 ''Identification cards — Recording technique'' is a set of nine (7811-1 to 7811-9) standards describing the recording technique on identification cards. It comprises: "Part 1" '' Embossing'' "Part 2" ''Magnetic stripe — Low coe ...
; Embossing of expiration date : the format (MM/YY or MM-YY) ;
Magnetic stripe The term digital card can refer to a physical item, such as a memory card on a camera, or, increasingly since 2017, to the digital content hosted as a virtual card or cloud card, as a digital virtual representation of a physical card. They share ...
: by reference to
ISO/IEC 7811 ISO/IEC 7811 ''Identification cards — Recording technique'' is a set of nine (7811-1 to 7811-9) standards describing the recording technique on identification cards. It comprises: "Part 1" '' Embossing'' "Part 2" ''Magnetic stripe — Low coe ...
;
Integrated circuit An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuits on one small flat piece (or "chip") of semiconductor material, usually silicon. Large numbers of tiny ...
with contacts : by reference to
ISO/IEC 7816 ISO/IEC 7816 is an international standard related to electronic identification cards with contacts, especially smart cards, and more recently, contactless mobile devices, managed jointly by the International Organization for Standardization (ISO) ...
-1 ; Integrated circuit without contacts : by reference to ISO/IEC 10536-1, ISO/IEC 14443-1, and ISO/IEC 15693-1


Magnetic tracks


Track 1

The Track 1 structure is specified as: * 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 ISO/IEC 7811 ''Identification cards — Recording technique'' is a set of nine (7811-1 to 7811-9) standards describing the recording technique on identification cards. It comprises: "Part 1" '' Embossing'' "Part 2" ''Magnetic stripe — Low coe ...
-2 The maximum record length is 79 alphanumeric characters.


Examples

%B4815881002867896^YATES/EUGENE JOHN         ^37829821000123456789? %B4815881002861896^YATES/EUGENE L            ^^^356858      00998000000?


Track 2

The Track 2 structure is specified as: * STX : Start sentinel ";" * PAN : Primary Account Number, up to 19 digits, as defined in
ISO/IEC 7812 ISO/IEC 7812 ''Identification cards – Identification of issuers'' is an international standard published jointly by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC). It specifies "a ...
-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).


Track 3

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. 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).


Programming

Parsing Track 1 and Track 2 can be done with
Regular Expressions A regular expression (shortened as regex or regexp; sometimes referred to as rational expression) is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" o ...
.


Track 1

^%B( -9\^( \^\^( -9\^)( -9\^)( \?)\?$ This Regex will capture all of the important fields into the following groups: * 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 2

^\;( -9\=( -9\=)( -9\=)( \?)\?$ * Group 1: Primary Account Number (PAN) * Group 2: Expiration date (ED) * Group 3: Service code (SC) * Group 4: Discretionary data (DD)


References


External links


ISO/IEC 7813:2006


Implementations


Magnetic Track Parser, a Java library to parse magnetic track data

Credit Card Track Data Parser, a Javscript library is for parsing credit card track data such as might be returned from a USB card reader

magnet, a Ruby library for decoding the track data on magnetic stripe cards

Magnetic-Stripe-Parser a .NET C Sharp library to parse magnetic track data direct from stream reader
{{DEFAULTSORT:ISO IEC 7813 #07813