Sunday, September 7, 2014

How to parse DE55

DE 55, also called Field 55, in ISO-8583 is Integrated Chip Data; so, it's easy to deduce that the EMV tags of an online transaction should be put in DE 55 when creating the corresponding ISO-8583 financial transaction message. But how?

Well, firstly, one needs to know that EMV tags are BER-TLV encoded in Field 55. Secondly, once you know the encoding itself, it's just a matter of putting all tags together one after another and you get your DE 55---no delimiters and no meta information; it's as simple as that. The only extra stuff that you might need will be the length/ encoding required by the ISO-8583 variant you are implementing. For example, if DE 55 is an LLVAR field, you'll need to add the overall length of the EMV data as LL in DE 55 before putting in all the EMV data.

Below is an example of DE 55 in an ISO-8583 message.


Here, 0149 is the LL-part of the LLVAR field, which indicates that the data is 149 bytes (or 298 hex characters), starting from 5F and ending at 00. You can copy this data, excluding the starting 0149, into EMV Lab's TLV Utilities and get this decoding by just a click of the button:

Tag Value
5F2A 0124
5F34 01
...and so on