Skip to main content

ISO 8583 Explained: MTIs, Bitmaps and Data Elements

Last Updated: 2026-12-01 Status: Complete

ISO 8583 is the international standard for financial transaction card messages, and it remains the wire format behind most card authorization traffic. After reading this page you will be able to decode a message type indicator and a bitmap by hand, interpret the data elements that most often explain a decline or a downgrade, and map the fields of a gateway API to the underlying message.

Quick Reference​

  • Editions: 1987, 1993, 2003 and 2023. Most production authorization traffic still uses 1987-style layouts.
  • Structure: MTI (4 digits), bitmap (primary 64 bits, optional secondary 64 bits), then data elements (DE) in ascending order.
  • Identifiers: STAN (DE 11), RRN (DE 37) and the network transaction ID serve different purposes.
  • Outcome: DE 39 is the response code; see Card Decline Codes.
  • Never log: DE 2 (PAN), DE 14 (expiration), DE 35 (Track 2), DE 45 (Track 1) and DE 52 (PIN data).

Why Does ISO 8583 Still Matter Behind JSON APIs?​

Gateway and processor APIs hide the message format, but its constraints leak through. Field lengths, the amount in minor units, the six-digit STAN, the 12-character RRN, and the way reversals reference an original request all originate in ISO 8583. When a processor returns a raw response code, an issuer-supplied advice code, or a "field format error", the explanation is found in the message layout. Platforms that connect directly to an acquirer, run host-to-host links, process for issuers, or build simulators work with the raw format.

Which Versions of ISO 8583 Exist?​

EditionNotes
ISO 8583:1987The de facto baseline for card networks and processors; the MTIs below use its numbering (leading digit 0)
ISO 8583:1993Added data elements and message types; leading MTI digit 1
ISO 8583-1:2003Restructured into parts; leading MTI digit 2; limited adoption in card authorization. Withdrawn in July 2023
ISO 8583:2023The current edition; it replaced the 2003 parts (withdrawn July 2023)

Networks implement their own dialects of the standard, described later on this page.

How Is an MTI Structured?​

The message type indicator (MTI) is four digits. Each digit has a defined meaning.

PositionMeaningExamples
1Version0 = 1987, 1 = 1993, 2 = 2003
2Message class1 authorization, 2 financial, 3 file actions, 4 reversal or chargeback, 5 reconciliation, 6 administrative, 7 fee collection, 8 network management
3Message function0 request, 1 request response, 2 advice, 3 advice response, 4 notification
4Message origin0 acquirer, 1 acquirer repeat, 2 issuer, 3 issuer repeat

Reading 0110: version 1987, authorization class, request response, originated by the acquirer side of the exchange.

Common 1987 MTIs and When They Are Used​

MTINameTypical use
0100 / 0110Authorization request / responseHold funds, account verification; typical for dual-message card flows
0120 / 0130Authorization advice / responseInform the issuer of an authorization decided elsewhere, for example stand-in processing by the network
0200 / 0210Financial request / responseAuthorization and posting in one message, as in single-message PIN debit and ATM
0220 / 0230Financial advice / responseFinancial transaction already completed, reported after the fact
0400 / 0410Reversal request / responseCancel a prior transaction, in whole or in part
0420 / 0430Reversal advice / responseNotify the issuer that a reversal has occurred or must be applied
0800 / 0810Network management request / responseSign-on, sign-off, echo test, key exchange
0101, 0401, 0421RepeatsRetransmission of 0100, 0400 or 0420 when no response was received

When Does an Engineer Send a Reversal or a Repeat?​

  • Timeout on a request. If a 0100 or 0200 receives no response, the outcome is unknown: the issuer may have approved and placed a hold. Send a reversal (0400, or 0420 where the network expects an advice) so any hold is released. A timeout is not a decline; see Why Is a Timeout Not a Decline?.
  • Repeat versus new request. A repeat (0401, 0421) retransmits the same business message so the receiver can detect a duplicate. A fresh 0100 is a new authorization and risks a duplicate hold.
  • Store-and-forward. When the link to the network is down, an acquirer or terminal may queue reversals and advices and forward them when the link returns. They are advices because the event has already occurred.
  • Partial reversal. When the final amount is below the authorized amount, the reversal carries the original amount plus a replacement amount. Field details vary by network; see Authorization Types and Authorization Reversals.

How Does the Bitmap Work?​

A bitmap tells the parser which data elements follow. The primary bitmap is 8 bytes (64 bits). Bit 1 is special: when set, a secondary bitmap of 8 more bytes follows and covers DE 65 to 128. Bit N, counted from the most significant bit of the first byte, is set when DE N is present.

Worked Example​

Primary bitmap (hex): 7234448008E08200

ByteHexBinaryBits setDEs (offset of 8 per byte)
1720111 00102, 3, 4, 7DE 2, 3, 4, 7
2340011 01003, 4, 6 of byteDE 11, 12, 14
3440100 01002, 6 of byteDE 18, 22
4801000 00001 of byteDE 25
5080000 10005 of byteDE 37
6E01110 00001, 2, 3 of byteDE 41, 42, 43
7821000 00101, 7 of byteDE 49, 55
8000000 0000nonenone

Bit 1 is clear (the first byte starts with binary 0), so there is no secondary bitmap. The message carries 16 data elements: 2, 3, 4, 7, 11, 12, 14, 18, 22, 25, 37, 41, 42, 43, 49 and 55. Subsequent fields appear in that order, each parsed according to its format.

What Are the Key Data Elements?​

Format notation: n numeric, an alphanumeric, ans alphanumeric and special, b binary, z track data. LLVAR means a two-digit length prefix precedes a variable value, LLLVAR a three-digit prefix. Exact lengths and encodings (ASCII, EBCDIC, BCD) vary by network and processor.

DENameTypical formatWhy engineers care
2Primary Account Numbern..19, LLVARCHD; never log; masked in all diagnostics
3Processing Coden6Transaction type and account types; for example Visa OCT 26, Mastercard Payment Transaction 28, refund 20
4Amount, Transactionn12Minor units with implied decimal; currency exponent comes from DE 49
7Transmission Date and Timen10 (MMDDhhmmss)UTC-style timestamp used in matching and timeout logic
11System Trace Audit Number (STAN)n6Request to response matching within a session or day
12Local Transaction Timen6Merchant local time; clock skew causes format or validation errors
14Expiration Daten4CHD; never log
18Merchant Category Coden4Drives interchange category and risk rules; see MCC
22POS Entry Moden3Entry method and PIN capability; see below
25POS Condition Coden2Conditions such as card-not-present or customer not present
35Track 2 Dataz..37, LLVARSAD; never store after authorization; never log
37Retrieval Reference Numberanp12Acquirer-assigned reference for support and reconciliation
38Authorization Identification Responseanp6Issuer-assigned approval code
39Response Codean2Outcome; see Response Codes
41Card Acceptor Terminal IDans8Identifies the terminal or virtual terminal; see terminal ID
42Card Acceptor Identification Codeans15The merchant ID; see MID
43Card Acceptor Name/Locationans40Descriptor fields; quality affects disputes and issuer decisions
49Currency Code, Transactionn3ISO 4217 numeric code, for example 840 for USD
52PIN Datab64Encrypted PIN block, SAD; never log
55ICC (EMV) Datab..999, LLLVARChip data such as the cryptogram; see EMV

Why Does DE 22 (POS Entry Mode) Drive Risk and Interchange?​

DE 22 states how the card data was captured. Its first two digits commonly encode the PAN entry mode (for example manual key entry, magnetic stripe, chip, contactless) and the third digit the PIN entry capability. Exact values differ slightly between networks, so confirm them against the network or processor specification you integrate with.

  • Issuer risk models weigh entry mode heavily: a chip-read, PIN-verified transaction carries a very different fraud profile from a keyed one.
  • Interchange qualification depends on how the transaction was captured. A card-present transaction that is sent as keyed, or a mis-set entry mode, can cause a downgrade.
  • Liability and dispute rights follow the data presented. A fallback from chip to stripe or a keyed entry can shift liability.
Engineering Takeaway

Never default DE 22 to a fixed value in a shared integration layer. Derive it from the actual capture method, and store the value you sent alongside the transaction so it can be audited during a downgrade or dispute review. See Interchange Qualification and Downgrades.

STAN, RRN and Network Transaction ID: How Does Matching Work?​

IdentifierAssigned byScopePurpose
STAN (DE 11)Message originatorTypically unique per originator for a limited windowMatch a response to its request; echoed in the response
RRN (DE 37)Acquirer or processorReferenceable by support teams and reconciliationLocate a transaction across systems; echoed in responses and used in clearing
Network transaction IDCard networkLifetime of a transaction chainLink a first authorization to later increments, reversals, clearing and stored-credential follow-ups; Visa carries it in field 62.2

Matching a response to a request uses a combination of fields rather than one key: STAN, the transmission date and time, the acquirer identification (DE 32) and the terminal ID. A reversal identifies the original message through its original data elements (DE 90 in 1987-style layouts), which repeat the MTI, STAN, date and time and institution identifiers of the message being reversed. Because STAN rolls over, a naive store keyed on STAN alone will eventually collide; include the date and the originator in the key.

What Does an Authorization Pair Look Like?​

The table below is a synthetic, fully masked example of a chip card-present purchase. No real data appears; sensitive elements are redacted. The bitmap shown earlier corresponds to this request. DE 35 and DE 52 are absent from the bitmap (chip read, no PIN). DE 14 is present in the bitmap but redacted here.

DEName0100 request0110 response
2PAN411111******1111 (masked)echoed masked
3Processing code000000 (purchase)000000
4Amount000000012500 (125.00)000000012500
7Transmission date and time12011530451201153046
11STAN483921483921
12Local time105430105430
14Expiration date[redacted]not returned
18MCC5411not returned
22POS entry mode051not returned
25POS condition code00not returned
35Track 2not presentnot present
37RRN633715483921633715483921
38Authorization ID responsenot presentA1B2C3
39Response codenot present00
41Terminal IDTERM0001TERM0001
42Merchant IDMERCHANT000001MERCHANT000001
43Card acceptor name/locationEXAMPLE STORE ANYTOWN US (fixed-width, space-padded)not returned
49Currency840840
52PIN datanot presentnot present
55ICC data[EMV data, not shown]issuer response data, not shown

How Do Gateway API Fields Map to ISO 8583?​

Gateway API fieldISO 8583 elementNotes
amount (minor units)DE 4Zero-padded to 12 digits; exponent from currency
currency ("USD")DE 49Converted to numeric ISO 4217
card.token or PANDE 2Gateway detokenizes at the last hop; see tokenization
card.expiryDE 14YYMM; CHD
entry_method or terminal capabilityDE 22, DE 25Derived by the gateway from capture method
merchant.mccDE 18From the merchant profile, not the request
merchant.idDE 42Acquirer-assigned
merchant.descriptorDE 43Name and location
reference or idempotency_keyNot carriedGateway-internal; see idempotency key
response.codeDE 39Often returned as both raw and normalized
authorization_codeDE 38Issuer approval code
network_transaction_idNetwork-specific fieldVisa field 62.2
emv_dataDE 55Tag-length-value structure
cvv2Network-specific fieldNot stored after authorization; see CVV2

The idempotency key does not appear on the wire. Duplicate suppression is the platform's responsibility, as discussed in the idempotency deep dive.

What Are Network Dialects?​

Visa (V.I.P. System, historically with BASE I for authorization and BASE II for clearing) and Mastercard (Banknet) each define their own message specifications. They redefine subfields, add private-use data elements and mandate different field formats and encodings. Public documentation is limited: full specifications are distributed to licensed participants under confidentiality. Treat any open-source parser or blog table as a starting point and validate against the specification supplied by your acquirer or network.

When Do Engineers Still Touch Raw ISO 8583?​

  • Direct acquirer or processor connections, where you build or maintain the host link.
  • Host-to-host integrations between a platform and a processor that expose ISO 8583 rather than REST.
  • Issuer processing, where authorizations must be received, decided and answered within strict time limits.
  • Simulators and test harnesses that emulate an issuer or network so that decline, timeout and reversal paths can be tested without live traffic.

Parser Sketch: Reading a Bitmap in TypeScript​

/** Returns the list of data element numbers present in a hex-encoded bitmap. */
export function presentDataElements(hex: string): number[] {
const bytes = Buffer.from(hex, 'hex');
if (bytes.length < 8) throw new Error('Primary bitmap must be 8 bytes');

const hasSecondary = (bytes[0] & 0x80) !== 0;
const length = hasSecondary ? 16 : 8;
if (bytes.length < length) throw new Error('Secondary bitmap truncated');

const present: number[] = [];
for (let bit = 1; bit <= length * 8; bit++) {
const byte = bytes[(bit - 1) >> 3];
const mask = 0x80 >> ((bit - 1) & 7);
if ((byte & mask) !== 0 && bit !== 1) present.push(bit);
}
return present;
}

// presentDataElements('7234448008E08200')
// => [2, 3, 4, 7, 11, 12, 14, 18, 22, 25, 37, 41, 42, 43, 49, 55]

A production parser must also apply a per-DE definition (format, length prefix, encoding), enforce maximum lengths and reject unknown elements rather than guessing. Fuzz it: parsers of externally supplied binary input are a classic source of injection and overflow defects (injection and insecure design in the OWASP Top 10, plus memory-safety defects).

What Are the Logging Rules for CHD and SAD?​

PCI DSS Data Handling

DE 2 (PAN), DE 14 (expiration date), DE 35 (Track 2), DE 45 (Track 1) and DE 52 (PIN data) carry cardholder data or sensitive authentication data. Sensitive authentication data must never be stored after authorization, even if encrypted. Do not write raw messages containing these elements to application logs, traces, APM payloads, crash dumps or support tickets.

  • Log a field allowlist (MTI, STAN, RRN, DE 39, amount, currency, terminal and merchant IDs, a token or truncated PAN), not a denylist.
  • Mask PANs to the permitted display form in any diagnostic output.
  • Redact at the serialization boundary so that a developer cannot accidentally log the full message object.
  • Use synthetic or masked data in tests, simulators and bug reports.
  • Confirm PCI scope with your QSA and security team; see PCI DSS.

What Is the Status of ISO 20022 for Cards?​

ISO 20022 is the XML-based standard that has replaced legacy formats in many payment systems for credit transfers and high-value payments. For cards there is no scheme-wide mandate: nexo standards cover terminal-to-acquirer messages and the ATICA specification covers acquirer-to-issuer, but most authorization traffic still runs on ISO 8583 according to the European Cards Stakeholders Group status report. Expect coexistence and gateways that translate, not a near-term replacement.

Time-Sensitive

Network specifications, dialects and field definitions change through network release cycles, and ISO 20022 adoption for cards is evolving. Confirm field-level details with your acquirer or network documentation. Rule-based values referenced in this category are tracked on Key Numbers.

References​

Share: