This page contains an explanation about the format of the three magnetic tracks in standard identification cards, particularly those used in financial transactions, i.e., credit and debit cards. It is a summary of the international standards ISO 7813 (tracks 1 and 2) and ISO 4909 (track 3).
SS: Start Sentinel. 1 character: %.
A: Reserved for proprietary use of card issuer.
B: Bank/financial. This is the format described here.
C-M: Reserved for use by ANSI Subcommittee X3B10.
N-Z: Available for use by individual card issuers.
In accordance with the account numbering scheme in ISO 7812.
0: Reserved for future use by ISO/TC 68.
00: Institutions other than card issuers.
2: Airlines and other future assignments.
59: Financial institutions not registered by ISO.
8: Telecommunications and other future assignments.
89: Telecommunications administrations and private operating agencies.
9: Reserved for national use.
Identifies the issuer. In some cases the first digit indicates the length of the IIN or the responsibility of its assignment outside of ISO. If MII = 9 then the first 3 digits should be the country code (CC).
Assigned by the card issuing institution.
Calculated using the Luhn formula for computing modulus 10 "double-add-double" check digit: Double the value of alternate (odd) digits starting by the least significant (first right hand) digit. Then add the individual digits of doubled (odd) numbers and even digits of the original number. If the value ends in 0 then the check digit is 0. Otherwise subtract the value from the next higher number ending in 0 (tens complement of the unit digit). The result is the check digit. Example: If the account number without check digit is 1234 5678 9012 344 then (8) + 4 + (6) + 2 + (2) + 0 + (1 + 8) + 8 + (1 + 4) + 6 + (1 + 0) + 4 + (6) + 2 + (2) = 65, therefore the check digit is 70 - 65 = 5 and so the complete account number is 1234 5678 9012 3445.
MasterCard PAN is variable up to 16 digits and VISA is 13 or 16 digits, including check digit.
FS: Field Separator. 1 character: ^.
Only if PAN starts with 59 (MasterCard).
Country codes are defined in ISO 3166: 724 for Spain, 840 for USA, etc.
Surname(s) (separated by space if necessary).
First name(s) or initial(s) (separated by space if necessary).
Period (when followed by title).
If this field is not used the content will be an space followed by a surname separator (/).
ED: Expiry Date. 4 digits: YYMM.
If this field is not used a FS will be in place.
Required by MasterCard and VISA.
0: Reserved for future use by ISO.
1: Available for international interchange.
2: Available for international interchange and with integrated circuit, which should be used for the financial transaction when feasible.
3: Reserved for future use by ISO.
4: Reserved for future use by ISO.
5: Available for national interchange only, except under bilateral agreement.
6: Available for national interchange only, except under bilateral agreement, and with integrated circuit, which should be used for the financial transaction when feasible.
7: Not available for general interchange, except under bilateral agreement.
8: Reserved for future use by ISO.
0: Transactions are authorized following the normal rules.
1: Reserved for future use by ISO.
2: Transactions are authorized by issuer and should be online.
4: Transactions are authorized by issuer and should be online, except under bilateral agreement.
5: Reserved for future use by ISO.
6: Reserved for future use by ISO.
7: Reserved for future use by ISO.
9: Reserved for future use by ISO.
0: No restrictions and PIN required.
2: Goods and services only (no cash).
3: ATM only and PIN required.
5: Goods and services only (no cash) and PIN required.
6: No restrictions and require PIN when feasible.
7: Goods and services only (no cash) and require PIN when feasible.
If this field in not used a FS will be in place.
Reserved for proprietary use of card issuer.
ES: End Sentinel. 1 character: ?.
LRC: Longitude Redundancy Check. 1 character.
SS: Start Sentinel. 1 character: ;.
FS: Field Separator. 1 character: =.
00: Not valid for international interchange.
01-02: Bank/financial. These are the formats described here.
03-19: Reserved for future use by ISO/TC 68.
20-89: Reserved for future use by ISO/TC 95 SC 17.
90-99: Reserved for proprietary use of card issuer, but not for international interchange.
If track 3 is to be used together with track 2 then PAN is an optional field.
Currency codes are defined in ISO 4217: 724 for Spanish peseta, 840 for US dollar, etc.
If 3 zeros (000) are written in this field it means card not valid for international interchange.
0-5: Power of ten by which multiply the currency amount fields (AA and AR) to get their actual values in the currency of the CuC field.
Maximum amount of money permitted in one cycle.
If 4 zeros (0000) are written in this field it means card not valid for charge operations (no debit).
Maximum amount of money permitted in this cycle. This field is dynamic, it is initialized with the value of the AA field the first time the card is used in a new cycle. Then it is modified accordingly.
Date in which actual cycle began. The format is YDDD where Y stands for the least significant digit of the year and DDD is the day of the year (001 to 366). The field must be updated each time a new cycle begin.
Alternatively this field may indicate the date from which the card is valid.
00: Infinite, AR should be decremented but never reset.
80: Cycle begin each 7 days.
81: Cycle begin each 14 days.
82: Cycle begins each 1st and 15th days of every month.
83: Cycle begins the day of the month specified in CB of every month.
84: Cycle begins the day of the month specified in CB of every third month.
85: Cycle begins the day of the month specified in CB of every sixth month.
86: Cycle begins the day of the year specified in CB of every year.
87-89: Reserved for future use by ISO/TC 68.
This field represents the duration of the cycle for which the AA limit holds.
Number of remaining PIN trials. It is initialized to 3 and reduced by one unit after every wrong PIN entered. It is reset to 3 after a successful PIN introduction. When this field reaches 0 the card is invalid for any interchange purpose.
If FC = 01 the two first digits represent the algorithm used to calculate PIN, where 00-09 mean private algorithm, 10-19 mean DEA and values 20 to 99 are reserved for future use by ISO/TC 68. Next 4 digits are PIN offset, a complementary value of PIN so customers can change their PIN, or PVV.
If FC = 02 the first digit represents the algorithm used to calculate PIN, where 0 means private algorithm, 1 means DEA and values 2 to 9 are reserved for future use by ISO/TC 68. The second digit represents a key for the algorithm. Next 4 digits are PIN offset, a complementary value of PIN so customers can change their PIN, or PVV.
1: Not available for international interchange.
2-8: Limited interchange, only local use and under agreement.
9: Limited interchange, recommended for test cards.
0: Associated account number not encoded on track.
2: Current or checking account.
4: Generic or universal account.
5: Interest-bearing current or checking account.
6-8: Reserved for future use by ISO/TC 68.
9: Reserved for card issuer's internal use, not for interchange.
2: No point of sale (POS) transaction.
3: No cash dispense and no POS transaction.
5-7: Reserved for future use by ISO/TC 68.
8-9: Reserved for card issuer's internal use, only local use and under agreement.
Same values and meaning as for PANSR field.
Allows to distinguish among different cards with the same PAN. It is incremented by one unit in any additional card.
If FC = 02 and a FS is in place it means that field ACSN is present.
The first digit represents the algorithm used to calculate a verification value to validate the information on the magnetic track against the embossed characters, where 0-4 are available for national use, 5-8 are available for international security methods given by ISO/TC 68, and 9 is reserved for private use. Next 8 digits are the verification value.
0: Include AD and DD fields in transactions messages.
1: Do not include AD field in transactions messages.
2: Do not include DD field in transactions messages.
A validation value which permits integrity verification of the magnetic stripe content.
Optional field reserved for proprietary use of card issuer if FC = 01.
Date of last cash dispense. The format is YDDD where Y stands for the least significant digit of the year and DDD is the day of the year (001 to 366).
Validation of the PIN or two additional PINs corresponding to different keys of the same algorithm. It can be an eight digit value, two four digit numbers or, in connection with the last four digits of the PINCP field, two six digit numbers.
Same purpose as CSN field but it allows for a maximum of 1000 different cards instead of 10.
Code for identification of an international group of issuers, when the IIN can not be used. It is equivalent to the term Network International Identifier used in ISO 8583.
Optional field reserved for proprietary use of card issuer.