We covered the background information on ISO 8583 in the link below.

Diagram showing the structure of an ISO 8583 message

You will find the ISO 8583 message structure and the details of these structures in this article.

ISO 8583 Message Structure

An ISO 8583 message consists of 3 main parts:

  • MTI (Message Type Indicator)
  • Bitmap (the field indicating which data elements are present in the message)
  • Data Element (the message content fields)

Application Data

Field #Description
0MTI Message Type Indicator
1 – Bitmap64 (or 128) bits indicating the presence/absence of the other fields
2 – 128The other fields indicated in the bitmap

We can briefly visualize the data flow as follows:

Diagram illustrating the ISO 8583 message processing pipeline

Now let's examine the details of these fields:

Message Type Indicator (MTI):

It is a 4-digit numeric field that indicates the high-level function of the message.

ISO Version – Message Class – Message Function – Message Origin

First Digit: indicates the version of the ISO message;

0xxxISO 8583: 1987 version
1xxxISO 8583: 1993 version
2xxxISO 8583: 2003 version
3xxxReserved for ISO use
4xxxReserved for ISO use
5xxxReserved for ISO use
6xxxReserved for ISO use
7xxxReserved for ISO use
8xxxReserved for national use
9xxxReserved for private use

Second Digit: indicates the message class.

Message ClassDescription
x1xxAuthorization Message
x2xxFinancial message
x3xxFile Actions Message
x4xxReversal and Chargeback Message
x5xxReconciliation Message
x6xxAdministrative Message
x7xxFee Collection Message
x8xxNetwork Message
x9xxReserved for ISO use

Third Digit: indicates the message function.

Message SubclassDescription
XX00Request message
xx10Response Message
xx20Advice Message
xx30Advice Response Message
xx40Notification Message
xx50 – xx90Reserved for ISO use


Fourth Digit:   indicates the direction of the message. 
Incrementing the fourth digit by one indicates a repeat request (except for x300 messages). For example: 1100 = Authorization Request; 1101 Authorization Request Repeat.

Message OriginatorDescription
0Acquirer
1Acquirer Repeat
2Issuer
3Issuer Repeat
4Other
5Other Repeat
6 – 9Reserved for ISO use

Therefore, by knowing the MTI value we can determine the type of the message. For example, if the MTI value is 1200,

  • The first digit is for the Version Number, and the value in the MTI is 1, so the message version is based on ISO 8583: 1993. 
  • The second digit is for the Message Class, and the value in the MTI is 2, so the message is a financial message. 
  • The third digit is for the message subclass / function, and the MTI value is 0, so this message is a request message. 
  • The fourth digit is for the Message Originator, and the MTI value is 0, so the message comes from the Acquirer. 
  • Putting all of this together, this message with an MTI value of 1200 is an ISO 1993 Financial Request Message sent by the Acquirer.

To summarize the above, the commonly used MTI values and their descriptions are as follows:

  Description
x100 Authorization Request
x101 Authorization Request Repeat
x102 Authorization completion confirmation
x103 Authorization completion confirmation repeat
x110 Authorization Response
x112 Authorization completion response
x120 Authorization Advice
x121 Authorization advice repeat
x122 Authorization advice completion confirmation
x123 Authorization advice completion confirmation Report
x130 Authorization Advice Response
x132 Authorization advice completion response
x200 Financial Request
x210 Financial Response
x220 Financial Advice
x230 Financial Advice Response
x300 Acquirer File Update Request
x302 Issuer File Update Request
x310 Acquirer File Update Response
x312 Issuer File Update Response
x320 Acquirer File Update Advice
x322 Issuer File Update Advice
x330 Acquirer File Update Advice Response
x332 Issuer File Update Advice Response
x400 Acquirer Reversal Request
x402 Issuer Reversal Request
x410 Acquirer Reversal Request Response
x412 Issuer Reversal Request Response
x420 Acquirer Reversal Advice
x422 Issuer Reversal Advice
x430 Acquirer Reversal Advice Response
x432 Issuer Reversal Advice Response
x5xx Reconciliation Request Messages
x6xx Administrative Request Messages
x800 Network Management Request
x810 Network Management Request Response

Bitmap

A bitmap is an indexing technique used in an ISO 8583 message to indicate which Data Elements are present in the message. 

The presence of a data element in a given message is indicated by a one (1) in its assigned position; a zero (0) in the assigned position indicates that a data element is absent. Every application transaction contains one (1) bitmap. A bitmap consists of 64 bits, numbered from the left starting with bit 1. The first bit of the bitmap is a secondary bitmap indicator. If a given ISO message does not support secondary bitmap processing, the first bit of the bitmap is '0'.

Bit 1Bit 2Bit 3Bit 4…Bit 64
Field 1 
'1' if a secondary bitmap is present, otherwise '0'
Field 2 
Card Number
Field 3 
Processing Code
Field 4 
Amount, Transaction
Field 64 
Message Authentication 
Code

A message contains at least one bitmap, called the Primary Bitmap, which indicates the presence of Data Elements 1 through 64.

Secondary Bitmap may be present in Data Element 1, and therefore the first bit of the Primary Bitmap indicates whether a secondary bitmap is present

According to the latest version of the ISO 8583 standard, a message can contain at most three bitmaps. A bitmap can be transmitted as 8 bytes (binary), or sometimes as 8 bytes represented, unexpanded, by 16 hexadecimal characters (1-9, A-F (ASCII)).

Data Elements

Data Elements are the fields that carry the transaction's information. While the original ISO 8583 (1987) standard supports up to 128 data elements, later versions can support up to 192 data elements. Each Data Element has a specific meaning and format. 

For example: bit value 2 is used for the Primary Account Number; 3 for the Processing Code; and 4 for the Transaction Amount.

 For each data element, ISO specifies the data format and size. ISO also specifies whether each data element is mandatory or optional for a given message.

Data Element Format

ISO-8583 essentially specifies different field types that fall into the following categories:

Fixed Length

• Numeric

• Alphanumeric

• Binary

Variable length

Max-length 99

• Numeric

• Alphanumeric

• Binary

Max-length 999

• Numeric

• Alphanumeric

• Binary

Nested message

Field Type Characteristics

AbbreviationMeaning
aAlphabetic, including spaces
nNumeric values only
sSpecial characters only
anAlphanumeric
asAlphabetic and special characters only
nsNumeric and special characters only
ansAlphabetic, numeric, and special characters
bBinary
zTrack 2 and Track 3 code sets as defined in ISO 7811 and ISO 7813
hHex data
LL, LLLThe length of the following variable field. 'LL' – two-digit length indicator (1 byte BCD); 'LLL' – three-digit length indicator (2 bytes BCD)
..17..125 A variable field up to 17 characters. '..' is a two-digit length indicator (1 byte BCD) that specifies the number of digits defining the length of the variable data that follows. For a variable field up to 125 characters, '…' is a three-digit length indicator (2 bytes BCD) that specifies the number of digits defining the length of the variable data that follows. 

A data element can be of fixed or variable length. 

In a message, the length indicator is shown before the variable-length field.

Fixed-Length Data Element

Fixed-length Data Elements have a length defined in the ISO 8583 standard, and no length indicator is needed in the message. These are specified together with their length, after the type of content allowed.

For example, Data Element 3 has the format 'n6', which means a 6-digit, fixed-length numeric field.

Variable-Length Data Element

Data elements other than fixed-length ones can have a variable length, and a length indicator is added before the data element in the message. The length indicator itself has a defined length.

For example, a 1-digit length indicator is sufficient for a variable-length field with a length between 1 and 9, while a 3-digit length indicator can support field values of up to 999. 

Variable-length fields are denoted with two dots '..', followed by the maximum length of the field. The length indicator is represented by a series of 'L' characters corresponding to the length of the length indicator itself.

For example, Data Element 2 is the numeric n..19, LLVAR, which means a field with up to 19 numeric digits, together with a 2-digit length indicator.

There is a prefix that indicates the length of variable-length fields, but the ISO standards do not define how it should be represented. As a result, different vendors use different representations (for example, BCD, EBCDIC, or binary value).

Sample Message Breakdowns

Example 1: 0800 Message

#NameValueHex Value
0MTI080008 00
1PRIMARY BITMAPIndicates the presence of fields 3, 11, and 41.20 20 00 00 00 80 00 00
3PROCESSING CODE00000000 00 00
11STAN (System Trace Audit Number)00000100 00 01
41
CARD ACCEPTOR TERMINAL IDENTIFICATION
2911000132 39 31 31 30 30 30 31

Here is the binary representation of our 0800 message:

080020200000008000000000000000013239313130303031

In the example above, 0800 is the message type indicator; the first digit indicates the version number:

       • 0 version 1987

The second digit is the message class:

• 8 network management

The third digit is the message subclass / function:

• 0 request

And the last digit is used to define the message originator.

• 0 acquirer

So “0800” is a 1987-version network management request.

Next, field 1 holds the primary bitmap value:

Primary Bitmap

ByteHex ValueBit ValueField #
0200010 00003
1200010 000011
2000000 0000 
3000000 0000 
4000000 0000 
5801000 000041
6000000 0000 
7000000 0000

We have parsed the MTI (0800) and the bitmap (2020000000800000).

We know that fields 3, 11, and 41 are populated, so let's look at our next field, field 3:

In our example, field #3 is used in BCD format. So the value “000000” is represented by three bytes with the values “00 00 00”. 

The same calculation applies to field #11, which is “000001”, represented as “00 00 01”. 

In our example, field #41 is an 8-byte alphanumeric field represented as 8 ASCII characters.

Message: 08002020 00000080 00000000 00000001

                32393131 30303031

MTI: 0800

Bitmap: 20200000 00800000

Field 03: 000000

Field 11: 000001

Field 41: 3239313130303031 (ASCII for “29110001”)

Example 2: Another 0800 Message

#NameValueHex Value
0MTI080008 00
1 APRIMARY BITMAPIndicates whether a secondary bitmap is present, plus the presence of fields 3, 11, and 41.A0 20 00 00 00 80 00 10
1.bSECONDARY BITMAPIndicates the presence of field 7004 00 00 00 00 00 00 00 00
3PROCESSING CODE00000000 00 00
11
STAN (System Trace Audit Number)
00000100 00 01
41
CARD ACCEPTOR TERMINAL IDENTIFICATION
2911000132 39 31 31 30 30 30 31
60RESERVED FOR PRIVATE USETEST MESSAGE00 10 54 45 53 54 20 4D 45 53 53 47
70
NETWORK MANAGEMENT INFORMATION CODE
30103 01

In the example above, there are two new fields, #60 and #70. Here is our message representation:

Message: 0800A020 00000080 00100400 00000000

                00000000 00000001 32393131 30303031

                00105445 5354204D 45535347 0301

MTI: 0800

Primary bitmap: A0200000 00800010

Secondary bitmap: 04000000 00000000

Field 03: 000000

Field 11: 000001

Field 41: 3239313130303031 (ASCII for “29110001”)

Field 60: 0010 54455354204D45535347 (length = 10, value = “TEST MESSG”)

Field 70: 0301

Let's break down this bitmap:

Primary Bitmap

ByteHex ValueBit ValueField #
0A01010 0000Secondary bitmap plus field #3 present
1200010 000011
2000000 0000 
3000000 0000 
4000000 0000 
5801000 000041
6000000 0000 
7100001 000060

Secondary Bitmap

Sample Authorization Response

Field #DescriptionValueComments
0MTI0110Authorization Response
2Card Number4321123443211234 
3Processing Code000000 
4Transaction Amount000000012300123.00
7Transaction Date0304054133MMYYHHMMSS
11STAN001205 
14Expiration Date0205YYMM
18Merchant Type5399 
22POS Entry Mode022Magnetic
25POS Condition Code00 
354321123443211234 = 02.0512312312332Track2
37RRN206305000014 
38n Number010305 
38Response Code00approved
41Terminal ID29110001 
42Acquirer ID1001001 
49Currency840US Dollar