Skip to main content

ISO 8583 & Response Codes: Payment Messaging Overview

Last Updated: 2026-12-01 Status: Complete

Every card authorization, however friendly the JSON API in front of it, eventually becomes a structured message in ISO 8583 and returns an answer in a two-character response code. This category explains both halves: the message format that carries the request, and the codes that describe the outcome.

Engineers who understand these layers can debug an unexplained decline from the raw fields, design a decline taxonomy that does not collapse every failure into "card declined", and avoid retry behavior that the card networks penalize.

Quick Reference​

TopicKey facts
Message formatISO 8583 editions 1987, 1993, 2003 (withdrawn July 2023) and 2023 (current); networks use proprietary dialects
Message typeFour-digit MTI: version, class, function, origin
Field layoutBitmap announces which of up to 128 data elements are present
OutcomeData element 39 carries the response code
Decline handlingClassify as soft or hard; networks publish category rules
Sensitive fieldsDE 2, 14, 35, 45 and 52 carry cardholder or sensitive authentication data and must never be logged

How the Pieces Fit​

The gateway translates JSON to ISO 8583 on the way out and translates a network response code into an internal decision on the way back. Most engineering judgment in this category lives at those two translation points.

Learning Objectives​

After completing this category you should be able to:

  • Decode an MTI and a hexadecimal bitmap by hand and identify which data elements are present.
  • Explain how STAN, RRN and network transaction ID differ and how requests, responses and reversals are matched.
  • Map gateway API fields to ISO 8583 data elements and explain why DE 22 influences risk and interchange.
  • Distinguish soft declines from hard declines using Visa decline categories and Mastercard Merchant Advice Codes.
  • Design an internal decline taxonomy and decide what to show the customer versus what to log.
  • Recognize that a timeout is not a decline and route it to reversal and recovery logic.

Topics​

  1. ISO 8583 Explained: MTIs, Bitmaps and Data Elements: message anatomy, bitmap decoding, key data elements, matching identifiers and a parser sketch.
  2. Card Decline Codes: Response Codes, Soft vs Hard Declines: the DE 39 reference table, network decline categories, and a TypeScript mapping to an internal taxonomy.
  3. Messaging Quiz: scenario questions to test your judgment.
Scope

Retry scheduling and limits are covered in Retry Strategy. Authorization types and reversals are covered in Authorization Types.

Share: