Basics
Primitive Data Types
TLV data objects use the following primitive data types:
A = Alphabetic (string, no numbers).
AN = Alphanumeric (string).
B = Binary value, which includes bit combinations (“OR” types).
CN = Compressed numeric, as defined by EMV 4.3 Book 3, section Data Element Format Conventions.
N = Numeric, as defined by EMV 4.3 Book 3, section Data Element Format Conventions.
T = TLV Constructed data object (TLV Value contains additional layers of TLV-encoded data the parser should continue to process).
About Track Data
After the host receives and decrypts EMV ARQC Type data or Merchant Data Container data from the device, it may need to parse each track into individual values embedded in the tracks. The device can read multiple card formats, which vary even between different issuers and payment brands using the same underlying standards. Describing all possible formats is beyond the scope of this document, but this section describes how to parse data from tracks 1, 2, and 3 in a generic ISO/ABA compliant format as an example.
Table 17 shows an example of ISO/ABA track data the device sends to the host, using unmasked placeholder numbers to make it easier to see the relative positions of the values embedded in the track data. It is important to note that some cards do not include Track 3 data. Manually entered data does not include Track 3.
Table - Example Generic ISO/ABA Track Data Format
Track 1 Data %75555555555555555^CARDHOLDER NAME/^33338880004444000006?
Track 2 Data ;5555555555555555=33338880004444006?
Track 3 Data ;5555555555555555=333388800044440000006?
The example track data in Table 17 can be interpreted as follows:
The %, ?, and ; are sentinels / delimiters, and are taken directly from the data on the card.
The first character at the beginning of Track 1 data is the card format code. For swiped credit / debit cards, this comes from the card and is generally B. Manually entered data uses M.
The string of 5s is the Account Number / License Number / PAN.
The carets (^) are standard ISO track 1 delimiters surrounding the Cardholder Name.
The string labeled CARDHOLDER NAME/ is the Cardholder Name. Manually entered data uses string literal MANUAL.
The string of 3s is the Expiration Date (YYMM).
The string of 8s is the Service Code. For swiped credit / debit cards, this comes from the card. Manually entered data uses 000.
The remaining characters ( 0s, 4s, and 6) are Discretionary Data. For swiped debit / credit cards this data is of varying length and content and comes from the card, and must be interpreted according to the standards established by issuers, payment brands, and so on. Manually entered track data uses a MagTek standard for Discretionary Data as follows:
The string of 4s is the CVV2 a cardholder or operator entered on the keypad. This may be 3 or 4 characters long and is not padded, so the host software must find it by using the fixed-length padding and sentinels that surround it.
The strings of 0s are literals of fixed length: Track 1 has three zeroes after the Service Code, and five zeroes after the CVV2; Track 2 has three zeroes after the Service Code, and two zeroes after CVV2.
The field option contains either a 0 or a 1. This Field Option tells what data is included in the track data, where:
0 = Acct, Date, CVV
1 = Name on Card, Acct, Date, CVV
Display Strings
The Display Strings type provides a pre-defined set of messages by string ID that the host and device use for various user interface features.
Table - Display String IDs and Strings
0x00
Reserved, do not use.
0x01
“AMOUNT”
0x02
“AMOUNT OK?”
0x03
“APPROVED”
0x04
“CALL YOUR BANK”
0x05
“CANCEL OR ENTER”
0x06
“CARD ERROR”
0x07
“DECLINED”
0x08
“ENTER AMOUNT”
0x09
Reserved, do not use.
0x0A
Reserved, do not use.
0x0B
“INSERT CARD”
0x0C
“NOT ACCEPTED”
0x0D
Reserved, do not use.
0x0E
“PLEASE WAIT”
0x0F
“PROCESSING ERROR”
0x10
“REMOVE CARD”
0x11
“USE CHIP READER”
0x12
“USE MAGSTRIPE”
0x13
“TRY AGAIN”
0x14
“WELCOME”
0x15
“PRESENT CARD”
0x16
“PROCESSING”
0x17
“CARD READ OK - REMOVE CARD”
0x18
“INSERT OR SWIPE CARD”
0x19
“PRESENT ONE CARD ONLY”
0x1A
“APPROVED PLEASE SIGN”
0x1B
“AUTHORIZING PLEASE WAIT”
0x1C
“INSERT, SWIPE, OR TRY ANOTHER CARD”
0x1D
“PLEASE INSERT CARD”
0x1E
Null prompt (empty screen)
0x1F
Reserved, do not use.
0x20
“SEE PHONE”
0x21
“PRESENT CARD AGAIN”
0x22
“INSERT/SWIPE/TRY OTHER CARD”
0x23
“TAP or SWIPE CARD”
0x24
“TAP or INSERT CARD”
0x25
“TAP, INSERT or SWIPE CARD”
0x26
“TAP CARD”
0x27
“TIMEOUT”
0x28
“TRANSACTION TERMINATED”
0x29
“USE CHIP READER or MAGSTRIPE”
0x2A
“SCAN BARCODE”
0x2B
“BARCODE READ SUCCESSFULLY”
0x2C
“CANCELED”
0x2D
“SWIPE CARD or SCAN BARCODE”
0x2E
“INSERT CARD or SCAN BARCODE”
0x2F
“INSERT, SWIPE or SCAN BARCODE”
0x30
“TAP CARD or SCAN BARCODE”
0x31
“TAP, SWIPE or SCAN BARCODE”
0x32
“TAP, INSERT or SCAN BARCODE”
0x33
“TAP, INSERT, SWIPE or SCAN BARCODE”
0x34
“TRY ANOTHER INTERFACE”
0x35
“NFC TAG DETECTED”
0x36
“ERROR REMOVE CARD”
0x37
“MIFARE CLASSIC 1K DETECTED”
0x38
“MIFARE CLASSIC 4K DETECTED”
0x39
“MIFARE DESFIRE DETECTED”
Encryption Type
The Encryption Type provides the key type, variant, and other information the host can use to decrypt encrypted data included in various payloads. The possible values are an ORed bitmask using the following elements:
0xxx xxxx = Fixed Key (Not used)
1xxx xxxx = DUKPT Key
xx00 xxxx = TDES
xx01 xxxx = AES128
xx10 xxxx = AES256
xxxx 0000 = Data Encrypt/Decrypt Variant
xxxx 0001 = PIN Variant
xxxx 0010 = MAC Variant
xxxx 0011 = Data, Encrypt Variant
xxxx 0100 = MAC Verify Variant
xxxx 0101 = RESERVED
xxxx 0110 = RESERVED
xxxx 0111 = AES PIN Encrypt
xxxx 1000 = AES MAC Generate
xxxx 1001 = AES MAC Verify
xxxx 1010 = AES MAC Generate/Verify
xxxx 1011 = AES Data Encrypt
xxxx 1100 = AES Data Decrypt
xxxx 1101 = AES Data Encrypt/Decrypt
xxxx 1110 = RESERVED
xxxx 1111 = RESERVED
Last updated

