ISO 20022 Parser

Parse ISO 20022 XML financial messages

1
Understanding ISO 20022 Messages
TL;DR

ISO 20022 is the next-generation financial messaging standard using XML, designed to replace SWIFT MT messages with richer, more structured data.

What is ISO 20022?

ISO 20022 is the international standard for electronic financial messaging, maintained by the International Organization for Standardization. Unlike the proprietary SWIFT MT format that uses tagged text fields, ISO 20022 employs XML-based messages (also called MX messages) with a rich, hierarchical data model that can represent complex financial transactions with far greater precision.

The standard was first published in 2004 and has since become the foundation for major payment systems worldwide, including SEPA in Europe, Fedwire in the United States (ISO 20022 adoption in 2025), and real-time payment systems in over 70 countries. ISO 20022 is not just a messaging format — it is a methodology for building financial message definitions using a common data dictionary.

The migration from SWIFT MT to ISO 20022 represents the largest transformation in financial messaging history, affecting every bank, market infrastructure, and corporate treasury connected to the SWIFT network.

MT vs MX: Side-by-Side Comparison

MT vs MX Message Structure Comparison A side-by-side diagram comparing the tagged text format of SWIFT MT messages on the left with the XML hierarchical structure of ISO 20022 MX messages on the right, highlighting the difference in data richness and structure. SWIFT MT (Legacy) :20:TXREF20240315001 :23B:CRED :32A:240315EUR25000,00 :50K:/FR7630006000011234 JOHN DOE :59:/DE89370400440532 JANE SMITH :71A:SHA Flat tagged structure Limited field length No structured addresses 4 x 35 char remittance Migration ISO 20022 MX (New) <GrpHdr> <MsgId>MSG001</MsgId> <NbOfTxs>1</NbOfTxs> </GrpHdr> <CdtTrfTxInf> <Amt Ccy="EUR">25000</Amt> <Dbtr><Nm>...</Nm> <PstlAdr>...</PstlAdr> </Dbtr> </CdtTrfTxInf> Hierarchical XML structure Rich structured data Full structured addresses 140 char structured remittance

MT to MX Mapping

The following table shows how the most common SWIFT MT message types map to their ISO 20022 (MX) equivalents:

MT MessageMX EquivalentBusiness AreaDescription
MT103pacs.008Payments ClearingCustomer credit transfer (FI to FI)
MT202pacs.009Payments ClearingFinancial institution credit transfer
MT940camt.053Cash ManagementEnd-of-day account statement
MT942camt.052Cash ManagementIntraday account report
MT101pain.001Payment InitiationRequest for transfer (customer to bank)
MT900/910camt.054Cash ManagementDebit/credit notification
MT199admi.004AdministrationFree format message / system event

How ISO 20022 Messages Work

ISO 20022 messages follow a consistent XML structure with three main layers:

  1. Business Area prefix identifies the domain: pain (Payment Initiation), pacs (Payments Clearing and Settlement), camt (Cash Management), sese (Securities Settlement)
  2. Message identifier specifies the exact message type (e.g., 008 for customer credit transfer within pacs)
  3. Version number tracks schema evolution (e.g., 001.08 is version 8 of variant 1)

Every MX message contains a Group Header (GrpHdr) with metadata like message ID, creation timestamp, number of transactions, and settlement method. The transaction-level data follows in repeating structures specific to the message type.

The XML schema (XSD) for each message type enforces strict validation rules — data types, mandatory elements, allowed values, and cross-field dependencies are all defined in the schema. This makes automated validation far more reliable than with free-form MT tags.

Migration Timeline

The SWIFT network migration from MT to ISO 20022 follows this schedule:

  • March 2023: Start of coexistence period — both MT and MX accepted on SWIFT
  • November 2025: End of coexistence for cross-border payments and reporting (pacs/camt)
  • 2025+: Continued migration for securities (sese/semt) and trade finance messages
  • Target state: Full ISO 20022 adoption across all SWIFT traffic categories

During coexistence, SWIFT provides in-network translation between MT and MX formats. However, data truncation occurs when converting rich MX messages to shorter MT fields, which is why institutions are encouraged to adopt ISO 20022 natively.

Common Use Cases

  • Cross-border payments: pacs.008 and pacs.009 handle customer and interbank transfers with full structured data
  • Cash management: camt.052, camt.053, and camt.054 deliver account reports and statements with rich transaction details
  • Payment initiation: pain.001 and pain.002 support customer-to-bank payment requests and status reports
  • Real-time payments: Most instant payment schemes (TIPS, FedNow, FAST) use ISO 20022 natively
  • Regulatory reporting: The richer data model supports enhanced compliance, sanctions screening, and AML checks
  • Corporate treasury: Structured remittance data enables straight-through reconciliation without manual matching

Try These Examples

Valid pacs.008 (Customer Credit Transfer) Valid

A valid pacs.008.001.08 (FI to FI Customer Credit Transfer) message with Group Header containing message ID, creation timestamp, and settlement info, plus a Credit Transfer Transaction with payment IDs, amount in EUR, charge bearer (shared), debtor/creditor details, and their respective agent BICs.

<Document xmlns='urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08'> <FIToFICstmrCdtTrf> <GrpHdr> <MsgId>MSG20240315001</MsgId> <CreDtTm>2024-03-15T10:30:00Z</CreDtTm> <NbOfTxs>1</NbOfTxs> <SttlmInf><SttlmMtd>INDA</SttlmMtd></SttlmInf> </GrpHdr> <CdtTrfTxInf> <PmtId><InstrId>INSTR001</InstrId><EndToEndId>E2E20240315</EndToEndId></PmtId> <IntrBkSttlmAmt Ccy='EUR'>25000.00</IntrBkSttlmAmt> <ChrgBr>SHAR</ChrgBr> <Dbtr><Nm>John Doe</Nm></Dbtr> <DbtrAgt><FinInstnId><BICFI>BANKFRPPXXX</BICFI></FinInstnId></DbtrAgt> <CdtrAgt><FinInstnId><BICFI>BANKDEFFXXX</BICFI></FinInstnId></CdtrAgt> <Cdtr><Nm>Jane Smith</Nm></Cdtr> </CdtTrfTxInf> </FIToFICstmrCdtTrf> </Document>
Invalid XML (Missing Required BIC Element) Invalid

This pacs.008 is missing the mandatory SttlmInf element in the Group Header and the BICFI element inside DbtrAgt/FinInstnId. Without settlement information and the debtor agent BIC, the receiving institution cannot process the payment.

<Document xmlns='urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08'> <FIToFICstmrCdtTrf> <GrpHdr> <MsgId>MSG20240315002</MsgId> <CreDtTm>2024-03-15T10:30:00Z</CreDtTm> <NbOfTxs>1</NbOfTxs> </GrpHdr> <CdtTrfTxInf> <PmtId><EndToEndId>E2E002</EndToEndId></PmtId> <IntrBkSttlmAmt Ccy='EUR'>5000.00</IntrBkSttlmAmt> <DbtrAgt><FinInstnId></FinInstnId></DbtrAgt> </CdtTrfTxInf> </FIToFICstmrCdtTrf> </Document>