HSM KitHSM Kit
English

ISO 8583 Payment Messages: Structure, Bitmap & Fields

Payment Security# ISO 8583# Bitmap# ATM# POS
Last Updated: April 3, 20265 min readBy HSM Kit Team
Need to calculate this now?
Use our free online ISO 8583 Bitmap Parser tool.

ISO 8583 is the international standard for financial transaction messages — every time you swipe a card at an ATM or POS terminal, an ISO 8583 message is generated. This guide explains the format and how to parse it.

What is ISO 8583?

ISO 8583 defines the format for electronic financial transaction messages between:

  • ATMs and banks
  • POS terminals and acquirers
  • Acquirers and card networks (Visa, Mastercard)
  • Interbank systems

It's been in use since 1987 and remains the backbone of global payment processing.

Message Structure

An ISO 8583 message consists of:

[MTI] [Bitmap] [Data Elements]

1. Message Type Indicator (MTI)

A 4-digit code identifying the message type:

MTIDescription
0100Authorization Request
0110Authorization Response
0200Financial Transaction Request
0210Financial Transaction Response
0400Reversal Request
0420Reversal Advice
0800Network Management Request
0810Network Management Response

The MTI has four components:

  • Version: 0 (1987), 1 (1993), 2 (2003)
  • Message Class: 1=Authorization, 2=Financial, 4=Reversal, 8=Network
  • Message Function: 0=Request, 1=Response, 2=Advice, 3=Advice Response
  • Message Origin: 0=Acquirer, 2=Issuer, 4=Other

2. Bitmap

The bitmap is a 64-bit (8-byte) field that indicates which data elements are present in the message.

  • Primary Bitmap: Always present (64 bits = fields 1-64)
  • Secondary Bitmap: Present if field 1 is set (fields 65-128)
  • Tertiary Bitmap: Present if field 65 is set (fields 129-192)

Each bit corresponds to a field number:

  • Bit 1 (MSB of first byte) = Field 1 (Secondary Bitmap)
  • Bit 2 = Field 2
  • ...
  • Bit 64 = Field 64

Example: Bitmap F230040102C00000 means fields 1,2,3,4,7,11,12,13,22,25,41,42 are present.

Use our ISO 8583 Bitmap Parser to decode any bitmap instantly.

3. Data Elements

ISO 8583 defines up to 192 data elements (fields). Common ones:

FieldNameTypeLength
2Primary Account Number (PAN)LLVARUp to 19
3Processing CodeFixed6
4Transaction AmountFixed12
7Transmission Date/TimeFixed10
11System Trace Audit Number (STAN)Fixed6
12Local Transaction TimeFixed6
13Local Transaction DateFixed4
22Point of Service Entry ModeFixed3
25Point of Service Condition CodeFixed2
35Track 2 DataLLVARUp to 37
37Retrieval Reference NumberFixed12
38Authorization ID ResponseFixed6
39Response CodeFixed2
41Card Acceptor Terminal IDFixed8
42Card Acceptor ID CodeFixed15
49Currency CodeFixed3
52PIN Data (encrypted)Fixed16
55ICC Data (EMV)LLLVARUp to 255
64MAC (Primary)Fixed16
128MAC (Secondary)Fixed16

Field Types

  • Fixed: Exact length, no length prefix
  • LLVAR: 2-digit length prefix + variable data
  • LLLVAR: 3-digit length prefix + variable data

Response Codes

Field 39 contains the response code:

CodeMeaning
00Approved
01Refer to card issuer
05Do not honor
12Invalid transaction
13Invalid amount
14Invalid card number
51Insufficient funds
54Expired card
55Incorrect PIN
57Transaction not permitted
61Exceeds withdrawal limit
91Issuer unavailable
96System malfunction

PIN in ISO 8583

Field 52 contains the encrypted PIN block (typically 8 bytes / 16 hex characters). The PIN is encrypted using the PIN Encryption Key (PEK) before being placed in this field.

The PIN block format (usually ISO 9564 Format 0) combines the PIN with the PAN. See our PIN Block guide for details.

MAC in ISO 8583

Fields 64 and 128 contain Message Authentication Codes to verify message integrity. The MAC is calculated over specific fields using the MAC key.

See our MAC guide for MAC algorithm details.

AS2805 — Australian EFTPOS

AS2805 is the Australian standard based on ISO 8583. It has some differences in field definitions and MAC calculation.

Use our AS2805 Message Parser for AS2805-specific parsing.

ATM NDC and Wincor Protocols

ATMs often use vendor-specific protocols:

  • NCR NDC (Neat Display Commands): Used by NCR ATMs
  • Wincor/Diebold: Used by Wincor Nixdorf ATMs

These are higher-level protocols that wrap ISO 8583 messages. Our Message Parser supports both NDC and Wincor formats.

Practical: Parsing a Transaction

Given a raw ISO 8583 message:

0200F230040102C000000000000000001600412345678901234500000000010000...
  1. First 4 chars: MTI = 0200 (Financial Transaction Request)
  2. Next 16 chars: Primary Bitmap = F230040102C00000
  3. Parse bitmap to find which fields are present
  4. Read each field in order

Use our ISO 8583 Bitmap Parser to decode the bitmap, then trace each field manually.

Try It Yourself

Related Tool
ISO 8583 Bitmap Parser