Card (ICC)Format: cnLength: var
9F20

Track 2 Discretionary Data

Tag ID
9F20
Format
cn
Length (bytes)
var
Source
Card (ICC)

What it is

Discretionary part of Track 2 held in the chip.

How tag 9F20 is encoded

EMV data objects are BER-TLV: tag, then length, then value. 9F20 is a 2-byte, context-specific class, primitive tag (tag number 32), so its value is plain data rather than nested TLV objects.

9F10011111Bits 8–7 = 10: context-specific class. Bit 6 = 0: primitive. Bits 5–1 all set: the tag number continues in the next byte.
2000100000Bit 8 = 0: last tag byte. Bits 7–1 = 32.

Length

The length varies, so read it from the length field: one byte for values up to 127 bytes, 81 plus one byte up to 255, 82 plus two bytes beyond that.

Value format cn

Format cn is compressed numeric: BCD, two digits per byte, left-aligned and padded on the right with F nibbles.

Who supplies it

The card supplies this value. The terminal reads it from the card’s responses during application selection, GET PROCESSING OPTIONS, READ RECORD or GENERATE AC, depending on where the issuer personalised it.

Specification reference

Defined in: EMV 4.x Book 3 (Application Specification), Annex A — Data Element Dictionary