Prowide ISO 20022

Open source Java framework for ISO 20022 MX messages. Complete object model, XML parser, builder, and JSON support for all MX message types across every business domain. Modular architecture with category-specific artifacts.
View on GitHub com.prowidesoftware:pw-iso20022
Message Model

Typed MX Classes for Every Message Type

A complete Java object model for all ISO 20022 MX messages. Each message type has a dedicated class -- MxPacs00800107, MxCamt05300108, MxPain00100111 -- with a full business dictionary of inner classes that map directly to the ISO 20022 schema elements.

Dedicated MxType class for every ISO 20022 message definition
Full business dictionary: GroupHeader, CreditTransferTransaction, PartyIdentification, etc.
Fluent setters for building complex message structures programmatically
All versions of every message type supported (not just the latest)
Generates valid ISO 20022 XML with proper namespaces via message()
java
// Create a pain.001.001.11 message
MxPain00100111 mx = new MxPain00100111();

// Build using the business dictionary
CustomerCreditTransferInitiationV11 init =
    new CustomerCreditTransferInitiationV11();

GroupHeader95 hdr = new GroupHeader95();
hdr.setMsgId("MSGID-001");
hdr.setNbOfTxs("1");
hdr.setCtrlSum(new BigDecimal("10000"));

PartyIdentification135 dbtr =
    new PartyIdentification135();
dbtr.setNm("Acme Corp");

init.setGrpHdr(hdr);
mx.setCstmrCdtTrfInitn(init);

System.out.println(mx.message());
Parsing

Parse Any MX Message from XML

Parse ISO 20022 XML into fully typed Java objects. Use a specific class like MxPacs00800107.parse() when the type is known, or AbstractMX.parse() for automatic type detection. The parser identifies the message type from the XML namespace and returns the corresponding typed model.

Parse from String, InputStream, or File
Automatic message type detection via AbstractMX.parse()
getMxId() returns the message identifier (e.g., camt.048.001.03)
Cast to specific type for full business element access
Handles all namespace conventions and document wrappers
java
// Parse when message type is unknown
AbstractMX mx = AbstractMX.parse(xml);

System.out.println(
    "Type: " + mx.getMxId().id());

// Cast to specific type for typed access
if ("camt.048.001.03"
      .equals(mx.getMxId().id())) {
    MxCamt04800103 camt =
        (MxCamt04800103) mx;
    System.out.println(
        camt.getModfyRsvatn()
            .getMsgHdr().getMsgId());
}

// Or parse a known type directly
MxPacs00800107 pacs =
    MxPacs00800107.parse(
        Lib.readResource(
            "pacs.008.001.07.xml"));
Headers

Application Header (BAH) Support

Full support for the Business Application Header (BAH). Create headers using AppHdrFactory with sender/receiver BICs, message identifiers, and business service configuration. The header is attached to any MX message and serialized together in the output XML.

BusinessAppHdrV02 creation via AppHdrFactory
Sender/receiver BIC, message ID, and business service configuration
Automatic MxId resolution from the message type
Header parsed and accessible when reading MX messages
Support for both BAH v1 and v2
java
// Create an MX message
MxCamt05600110 mx = new MxCamt05600110();
// ... build message content ...

// Create Business Application Header
BusinessAppHdrV02 header =
    AppHdrFactory.createBusinessAppHdrV02(
        "AAAAUSXX",     // sender
        "BBBBUSXX",     // receiver
        "MYREF1234",    // msg ID
        mx.getMxId());  // msg def

// Optional: set business service
header.setBizSvc(
    "swift.cbprplus.02");

// Attach and serialize
mx.setAppHdr(header);
System.out.println(mx.message());
Serialization

JSON Conversion & Round-Trip

Convert any MX message to JSON with toJson() and parse back from JSON with fromJson(). Full round-trip fidelity: XML to Java to JSON to Java to XML preserves all business data. Useful for REST APIs, message stores, and system integration where JSON is preferred over XML.

toJson() serializes the complete MX structure to JSON
fromJson() reconstructs the full typed Java model
Round-trip fidelity: XML to JSON to XML lossless
Works with any MX message type and version
java
// Parse an MX from XML
MxPacs00800107 mx =
    MxPacs00800107.parse(
        Lib.readResource(
            "pacs.008.001.07.xml"));

// Convert to JSON
String json = mx.toJson();
System.out.println(json);

// Parse back from JSON (round-trip)
MxPacs00800107 mx2 =
    MxPacs00800107.fromJson(json);

// Back to XML
System.out.println(mx2.message());
Modification

Message Modification & Enrichment

Parse an existing MX message, modify its content programmatically, and serialize back to XML. Ideal for enrichment workflows where messages pass through intermediary systems that need to add, update, or transform specific elements -- such as injecting a UETR into payment transactions.

Parse, modify, serialize workflow
Navigate the object model to any business element
Iterate over repeated structures (transactions, parties, amounts)
Add missing elements or update existing values
Preserves all original content that is not explicitly modified
java
// Parse a pacs.009 from file
MxPacs00900109 mx =
    MxPacs00900109.parse(
        Lib.readResource(
            "pacs.009.001.09.xml"));

// Add UETR to all transactions
for (CreditTransferTransaction44 tx :
    mx.getFICdtTrf().getCdtTrfTxInf()) {

    UUID uuid = UUID.randomUUID();
    tx.getPmtId()
      .setUETR(uuid.toString());
}

// Output the modified XML
System.out.println(mx.message());
Architecture

Comprehensive Single-Jar Distribution

The library is distributed via Maven Central as a single fat jar covering all ISO 20022 business domains -- payments (pacs), cash management (camt), securities (sese, seev, semt), payment initiation (pain), and every other category. One dependency gives you access to the complete ISO 20022 model. The source repository is organized in a modular structure with category-specific modules for development convenience.

Single Maven artifact (pw-iso20022) with all message categories included
Core infrastructure with AbstractMX, AppHdr, and shared base classes
Source repo organized in category-specific modules (model-pacs-mx, model-camt-mx, etc.)
Generated JAXB classes for XML binding
Java 11+ compatible
ISO 20022 Business Domains
Complete coverage across all ISO 20022 message categories, with all versions of every message type.

Payments (pacs)

FI-to-FI credit transfers, direct debits, payment status reports. pacs.002, pacs.008, pacs.009, pacs.004, pacs.010, and all versions.

Cash Management (camt)

Account statements, debit/credit notifications, bank-to-customer reports. camt.052, camt.053, camt.054, camt.056, and more.

Payment Initiation (pain)

Customer credit transfer initiation, payment status, mandate management. pain.001, pain.002, pain.008, pain.013, and all versions.

Securities (sese, seev, semt)

Settlement instructions, corporate actions, portfolio statements. All securities sub-domains with full model coverage.

FX & Trade (fxtr, tsmt, trea)

Foreign exchange trading, trade services, treasury operations. Confirmations, status, and notifications across trade lifecycle.

All Other Domains

Administration (admi), authorities (auth), collateral (colr), fund processing (reda), and every other ISO 20022 business domain.

Library Specifications

Library

Artifact: com.prowidesoftware:pw-iso20022
License: Apache License 2.0
Language: Java (11+)
Build: Gradle
Updates: Yearly SRG releases + continuous patches

Capabilities

Coverage: All ISO 20022 MX message types and versions
Parsing: XML with automatic type detection
Serialization: ISO 20022 XML, JSON
Headers: BAH v1 and v2 support
Distribution: Single fat jar via Maven Central
Get started with Prowide ISO 20022
Free and open source under the Apache 2.0 license. Add the dependency, parse your first MX message, and start building.