ISO 8583 :: Message Structure
ISO 8583 messages consist of 3 parts. The MTI (Message Type Indicator), the bitmap and finally the actual message data, grouped into a number of elements.
The MTI is a four digit numeric code which, as the name suggests, contains information about the message type of the current message. This includes information about the ISO version, the message function and who's sending it.
The MTI is followed by the bitmap which indicated which elements are present in the body of the message. In typical implementations, the bitmap is really a vector of single bits, either 8 or 16 bytes in length and thus can indicate the presence or absence or 64 or 128 data elements in the body of the message.
The bitmap is followed by the a series of data elements or fields, some of which may be further subdivided into subfields. The specific mode of data encoding varies from field to field. ISO 8583 specifies the description and encoding information for a number of fields. Some of these definitions are more or less constant across all ISO 8583 implementations, for example the card number is nearly always contained in a field indicated by bit 2 and named "PAN". In general though, the meaning of the fields and their encoding is specific to the ISO 8583 dialect.