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?
| Edition | Notes |
|---|---|
| ISO 8583:1987 | The de facto baseline for card networks and processors; the MTIs below use its numbering (leading digit 0) |
| ISO 8583:1993 | Added data elements and message types; leading MTI digit 1 |
| ISO 8583-1:2003 | Restructured into parts; leading MTI digit 2; limited adoption in card authorization. Withdrawn in July 2023 |
| ISO 8583:2023 | The 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.
| Position | Meaning | Examples |
|---|---|---|
| 1 | Version | 0 = 1987, 1 = 1993, 2 = 2003 |
| 2 | Message class | 1 authorization, 2 financial, 3 file actions, 4 reversal or chargeback, 5 reconciliation, 6 administrative, 7 fee collection, 8 network management |
| 3 | Message function | 0 request, 1 request response, 2 advice, 3 advice response, 4 notification |
| 4 | Message origin | 0 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
| MTI | Name | Typical use |
|---|---|---|
0100 / 0110 | Authorization request / response | Hold funds, account verification; typical for dual-message card flows |
0120 / 0130 | Authorization advice / response | Inform the issuer of an authorization decided elsewhere, for example stand-in processing by the network |
0200 / 0210 | Financial request / response | Authorization and posting in one message, as in single-message PIN debit and ATM |
0220 / 0230 | Financial advice / response | Financial transaction already completed, reported after the fact |
0400 / 0410 | Reversal request / response | Cancel a prior transaction, in whole or in part |
0420 / 0430 | Reversal advice / response | Notify the issuer that a reversal has occurred or must be applied |
0800 / 0810 | Network management request / response | Sign-on, sign-off, echo test, key exchange |
0101, 0401, 0421 | Repeats | Retransmission 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
0100or0200receives no response, the outcome is unknown: the issuer may have approved and placed a hold. Send a reversal (0400, or0420where 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 fresh0100is 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
| Byte | Hex | Binary | Bits set | DEs (offset of 8 per byte) |
|---|---|---|---|---|
| 1 | 72 | 0111 0010 | 2, 3, 4, 7 | DE 2, 3, 4, 7 |
| 2 | 34 | 0011 0100 | 3, 4, 6 of byte | DE 11, 12, 14 |
| 3 | 44 | 0100 0100 | 2, 6 of byte | DE 18, 22 |
| 4 | 80 | 1000 0000 | 1 of byte | DE 25 |
| 5 | 08 | 0000 1000 | 5 of byte | DE 37 |
| 6 | E0 | 1110 0000 | 1, 2, 3 of byte | DE 41, 42, 43 |
| 7 | 82 | 1000 0010 | 1, 7 of byte | DE 49, 55 |
| 8 | 00 | 0000 0000 | none | none |
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.
| DE | Name | Typical format | Why engineers care |
|---|---|---|---|
| 2 | Primary Account Number | n..19, LLVAR | CHD; never log; masked in all diagnostics |
| 3 | Processing Code | n6 | Transaction type and account types; for example Visa OCT 26, Mastercard Payment Transaction 28, refund 20 |
| 4 | Amount, Transaction | n12 | Minor units with implied decimal; currency exponent comes from DE 49 |
| 7 | Transmission Date and Time | n10 (MMDDhhmmss) | UTC-style timestamp used in matching and timeout logic |
| 11 | System Trace Audit Number (STAN) | n6 | Request to response matching within a session or day |
| 12 | Local Transaction Time | n6 | Merchant local time; clock skew causes format or validation errors |
| 14 | Expiration Date | n4 | CHD; never log |
| 18 | Merchant Category Code | n4 | Drives interchange category and risk rules; see MCC |
| 22 | POS Entry Mode | n3 | Entry method and PIN capability; see below |
| 25 | POS Condition Code | n2 | Conditions such as card-not-present or customer not present |
| 35 | Track 2 Data | z..37, LLVAR | SAD; never store after authorization; never log |
| 37 | Retrieval Reference Number | anp12 | Acquirer-assigned reference for support and reconciliation |
| 38 | Authorization Identification Response | anp6 | Issuer-assigned approval code |
| 39 | Response Code | an2 | Outcome; see Response Codes |
| 41 | Card Acceptor Terminal ID | ans8 | Identifies the terminal or virtual terminal; see terminal ID |
| 42 | Card Acceptor Identification Code | ans15 | The merchant ID; see MID |
| 43 | Card Acceptor Name/Location | ans40 | Descriptor fields; quality affects disputes and issuer decisions |
| 49 | Currency Code, Transaction | n3 | ISO 4217 numeric code, for example 840 for USD |
| 52 | PIN Data | b64 | Encrypted PIN block, SAD; never log |
| 55 | ICC (EMV) Data | b..999, LLLVAR | Chip 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.
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?
| Identifier | Assigned by | Scope | Purpose |
|---|---|---|---|
| STAN (DE 11) | Message originator | Typically unique per originator for a limited window | Match a response to its request; echoed in the response |
| RRN (DE 37) | Acquirer or processor | Referenceable by support teams and reconciliation | Locate a transaction across systems; echoed in responses and used in clearing |
| Network transaction ID | Card network | Lifetime of a transaction chain | Link 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.
| DE | Name | 0100 request | 0110 response |
|---|---|---|---|
| 2 | PAN | 411111******1111 (masked) | echoed masked |
| 3 | Processing code | 000000 (purchase) | 000000 |
| 4 | Amount | 000000012500 (125.00) | 000000012500 |
| 7 | Transmission date and time | 1201153045 | 1201153046 |
| 11 | STAN | 483921 | 483921 |
| 12 | Local time | 105430 | 105430 |
| 14 | Expiration date | [redacted] | not returned |
| 18 | MCC | 5411 | not returned |
| 22 | POS entry mode | 051 | not returned |
| 25 | POS condition code | 00 | not returned |
| 35 | Track 2 | not present | not present |
| 37 | RRN | 633715483921 | 633715483921 |
| 38 | Authorization ID response | not present | A1B2C3 |
| 39 | Response code | not present | 00 |
| 41 | Terminal ID | TERM0001 | TERM0001 |
| 42 | Merchant ID | MERCHANT000001 | MERCHANT000001 |
| 43 | Card acceptor name/location | EXAMPLE STORE ANYTOWN US (fixed-width, space-padded) | not returned |
| 49 | Currency | 840 | 840 |
| 52 | PIN data | not present | not present |
| 55 | ICC data | [EMV data, not shown] | issuer response data, not shown |
How Do Gateway API Fields Map to ISO 8583?
| Gateway API field | ISO 8583 element | Notes |
|---|---|---|
amount (minor units) | DE 4 | Zero-padded to 12 digits; exponent from currency |
currency ("USD") | DE 49 | Converted to numeric ISO 4217 |
card.token or PAN | DE 2 | Gateway detokenizes at the last hop; see tokenization |
card.expiry | DE 14 | YYMM; CHD |
entry_method or terminal capability | DE 22, DE 25 | Derived by the gateway from capture method |
merchant.mcc | DE 18 | From the merchant profile, not the request |
merchant.id | DE 42 | Acquirer-assigned |
merchant.descriptor | DE 43 | Name and location |
reference or idempotency_key | Not carried | Gateway-internal; see idempotency key |
response.code | DE 39 | Often returned as both raw and normalized |
authorization_code | DE 38 | Issuer approval code |
network_transaction_id | Network-specific field | Visa field 62.2 |
emv_data | DE 55 | Tag-length-value structure |
cvv2 | Network-specific field | Not 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?
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.
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.
Related Topics
- Card Decline Codes: Response Codes, Soft vs Hard Declines: interpret DE 39 and design a decline taxonomy.
- Authorization Types: how estimated, incremental and final authorizations use these fields.
- Stored Credentials: network transaction ID chaining for CIT and MIT.
- Clearing and Settlement: where the authorization data resurfaces in clearing.
- Transaction Lifecycle Overview: the conceptual flow.
- Check your understanding: Messaging Quiz
References
- ISO 8583:2023, Financial-transaction-card-originated messages — Interchange message specifications: International Organization for Standardization, 2023 (current edition).
- ISO 8583-1:2003, Financial transaction card originated messages — Part 1: International Organization for Standardization, 2003 (withdrawn).
- Status Report on Cards Standardisation: European Cards Stakeholders Group, for the ISO 20022 status.
- Estimated and Incremental Authorization and Reversal Processing Requirements for Visa Merchants: Visa, 2024, for linking fields such as the transaction identifier.
- PCI DSS v4.0: PCI Security Standards Council, for data storage and logging requirements.