Tools
DOL Builder
Paste a PDOL, CDOL1, CDOL2, DDOL, TDOL or DSDOL, or the card response that contains it. Fill in the terminal data and get the exact command data and APDU, built with the EMV Book 3 rules for truncation and padding, each step explained.
1. The DOL
2. The values
Enter each value at its real length, in hex (numeric data as BCD digits). Leave a value empty when the terminal does not have it: it is then filled with zeros, as Book 3 requires.
| Tag | Format | DOL length | Value (hex) | Sent | Rule applied |
|---|---|---|---|---|---|
| Paste a DOL to start. | |||||
3. The result
Command data, one colour per DOL entry (hover for its tag). Bytes like these were added by the terminal: padding, or zeros for a missing value.
How DOLs are built
A Data Object List is a list of tags and lengths, without values, sent by the card. The terminal answers with the values only, concatenated in the DOL's order, each at exactly the length the DOL asks for: no tags, no lengths.
Longer than the DOL asks: numeric (n) data loses its leftmost bytes, any other format its rightmost bytes. Shorter: numeric data gets leading 00s, compressed numeric (cn) trailing FFs, and an, ans or binary data trailing 00s. Example: Amount, Authorised 000000001234 in a 4-byte DOL entry becomes 00001234.
A tag the terminal does not know, a constructed tag, optional data the terminal does not have, or data that does not apply to this transaction: the terminal sends zeros for the requested length.
The PDOL data goes in tag 83 in GET PROCESSING OPTIONS (8300 when the card has no PDOL). CDOL1 and CDOL2 data go raw in GENERATE AC, DDOL data in INTERNAL AUTHENTICATE (with the terminal's Default DDOL when the card has none). TDOL data is not sent: its SHA-1 hash is the TC Hash Value (98).
Book C-2 applies the same rules to the PDOL and CDOL1, with two additions. The last DSDOL entry is sent at its real length, never padded. A tag present with a length of zero is zero-filled, after the kernel has asked the terminal for a value when Data Exchange is supported.
EMV v4.4 Book 3, 5.4 Rules for Using a Data Object List, and 6.5 for the commands; EMV Contactless Book C-2 v2.12, 4.1 for the Kernel 2 additions.