# How to Read ISO8583 Message

I assume that you already read the basic information about ISO8583. You can go to wikipedia for reference if you confused while reading my post here.

Here is ISO8583 sample message:

0200723A4001084180021666666612345678905610000000010010000327110332000981180332032703286011040014000980      000000000012123036123456     000012345678900000100000028000288

what is the content actually?

Here is the step:

1. 0200 >>This is MTI. It means the message use ISO8583 with 1987 version and the process is Acquirer Financial Request.
2. 723A400108418002 >> This is Bitmap. It will indicates which other data elements or data element subfields may be present elsewhere in a message. The step are:
• Take first Bitmap number. Then make it into hexa. In this example 7 will become 0111. The 0 of that hexa means that there is no bit65 present in this message. So we only need to take 16 part of the message. (16*4=64bit)
• Change all that 16 character to hexa. The 1 means the bit message are present. On this sample the message that present are on bit 2,3,4,7,11,12,13,15,18,32,37,42,48,49,63.
3. The rest of message are data element which is contain the transaction information. For example, look at bit 63. The character can be alpha numeric or symbol have 999 characters (ans…999). So the message looks like 00214. This means that on bit 63 only have 2 characters and the message are 14.
```
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = [000980 ]
Bits = 
Bits = [123456 0000123456789000001000000]
Bits = 
Bits = 

```

## 4 thoughts on “How to Read ISO8583 Message”

1. Nishant Shah says:

Hi There,

thank you for the post. its a good read but id appreciate if you can take time to take up with full example and decode every bit of it. this would help newbies understand the basics better.

i have a question… why was 1 before the pan omitted and a lot more like these. these can certainly be answered if every bit is decoded.

Thanks.

Nishant.

1. ariestania says:

Hi..
In my example I did not activate secondary bitmap. So thats why bit 1 did not exist. Its not omitted. It happen on other bits that not active.
And for Bit 1, it only active if bit above 64 exist.

2. Ali says:

Hi Ariestania,

I would like to see the output of your ISO 8583, when we have an ODD Length of PAN in field no 2

For E.g:
Field No 2 : 441067855577149

would there be a leading/trailing padding of Zero/F when the message is created ??

Thanks,
Ali

1. ariestania says:

Hi Ali,

Sorry for the late response.
About PAN, its depand on ISO specification in your institution. But usually, PAN will not get any padding. In my code I use jpos to help me build the message. You can take a look on my post about jpos.

Here is another example:
0200723E440128419002154410678555771493810000000000000000820063945025049133945082008210821123402106000123241236666661234567890=0821025049 0000000XYABC12303101234012345678901234567123456012801234567980123456003088

Bitmap : 723E440128419002
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = 
Bits = [1236666661234567890=0821]
Bits = [025049 ]
Bits = [0000000XYABC123]
Bits = 
Bits = 
Bits = 
Bits = 

Hope it can be help 🙂