Prowide Core

Open source Java framework for SWIFT FIN MT messages. Complete object model, parser, and builder for all ISO 15022 message types. Active since 2006, production-ready, and commercially supported.
View on GitHub com.prowidesoftware:pw-swift-core
Message Model

Typed MT Classes for Every Message Type

Prowide Core provides a complete Java object model for all SWIFT FIN MT messages. Each message type has a dedicated class (MT103, MT202, MT940, etc.) with typed field accessors, fluent setters, and built-in serialization. Fields are represented by individual classes (Field20, Field32A, Field59, etc.) with semantic getters for each component.

Dedicated MTnnn class for every SWIFT message type
Typed Field classes with component-level accessors (date, currency, amount, BIC, etc.)
Fluent builder API with chainable setters
Sender/receiver, message type, and all header blocks modeled
Sequence support for complex messages (MT548, MT535, MT537, etc.)
java
// Create an MT103 with typed fields
final MT103 m = new MT103();
m.setSender("FOOSEDR0AXXX");
m.setReceiver("FOORECV0XXXX");

m.addField(new Field20("REFERENCE"));
m.addField(new Field23B("CRED"));

Field32A f32A = new Field32A()
    .setDate(Calendar.getInstance())
    .setCurrency("EUR")
    .setAmount("1234567,89");
m.addField(f32A);
Parsing

Parse Any MT Message into Java Objects

Parse raw SWIFT FIN content into fully typed Java objects. Use MT103.parse() for known types or AbstractMT.parse() for generic parsing. Access individual fields with typed getters that return component-level data -- dates as Calendar, amounts as BigDecimal, BICs as structured objects.

Parse from String, InputStream, or File
Typed field getters: getField20(), getField32A(), etc.
Component-level access: getDateAsCalendar(), getCurrency(), getAmount()
Generic parsing with AbstractMT.parse() for unknown message types
Field label resolution via Field.getLabel()
java
// Parse an MT103 from a file
MT103 mt = MT103.parse(
    Lib.readResource("mt103.txt", null));

System.out.println(
    "Sender: " + mt.getSender());

// Typed field access
Field32A f = mt.getField32A();
SimpleDateFormat sdf =
    new SimpleDateFormat("yyyy/MM/dd");
System.out.println("Value Date: "
    + sdf.format(
        f.getDateAsCalendar().getTime()));
System.out.println("Amount: "
    + f.getCurrency()
    + " " + f.getAmount());
Serialization

JSON & XML Conversion

Convert any MT message to JSON with a single method call using toJson(). The library also supports conversion to Prowide's proprietary XML format for integration scenarios. Parse back from JSON or XML into the full object model for round-trip processing.

MT to JSON with toJson() -- all blocks and fields serialized
MT to proprietary XML with toXml() for system integration
Round-trip: parse from JSON or XML back to Java objects
Preserves all message structure including headers and trailers
java
// Parse raw FIN into a SwiftMessage
SwiftParser parser =
    new SwiftParser(fin);
SwiftMessage mt = parser.message();

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

// Convert to proprietary XML
String xml = mt.toXml();

// Parse back from JSON
SwiftMessage fromJson =
    SwiftMessage.fromJson(json);
File I/O

RJE & Batch File Processing

Read and write SWIFT RJE (Remote Job Entry) files containing multiple messages. The I/O module handles batch processing, message splitting, and file-level operations. Parse files containing multiple MT messages and process them individually, or write collections of messages back to RJE format.

Read RJE files with multiple messages into individual SwiftMessage objects
Write collections of messages to RJE format
Split complex multi-message files (e.g., MT537 with sub-messages)
Support for ACK/NAK message parsing alongside content
Flexible input from files, streams, or strings
java
// Read an RJE file with multiple messages
RJEReader reader =
    new RJEReader(
        new FileInputStream("batch.rje"));

String msg;
while ((msg = reader.next()) != null) {
    AbstractMT mt = AbstractMT.parse(msg);
    System.out.println(
        mt.getMessageType()
        + " " + mt.getSender());
}

// Write messages to RJE format
RJEWriter writer =
    new RJEWriter(
        new FileOutputStream("out.rje"));
writer.write(mt103);
writer.close();
Validation Utilities

BIC & IBAN Validation

Built-in utilities for validating BIC (Business Identifier Code) and IBAN (International Bank Account Number) structures. The validators check format compliance, check digit verification, and country-specific rules -- all included in the open source library at no cost.

BIC format validation (8 or 11 characters, structure checks)
IBAN validation with check digit verification
Country-specific IBAN length and format rules
Utility classes for common SWIFT data operations
java
// BIC validation
BIC bic = new BIC("DEUTDEFFXXX");
System.out.println(
    "Valid: " + bic.isValid());
System.out.println(
    "Institution: "
    + bic.getInstitution());
System.out.println(
    "Country: " + bic.getCountry());

// IBAN validation
IBAN iban = new IBAN(
    "ES6621000418401234567891");
System.out.println(
    "Valid: " + iban.isValid());
System.out.println(
    "BBAN: "
    + iban.getBban());
Database Integration

JPA Entity Model

Prowide Core includes a JPA-annotated entity model for persisting SWIFT messages in relational databases. Store, query, and retrieve messages using standard JPA/Hibernate without building your own persistence layer. The entity model maps the full message structure -- headers, blocks, fields, and sequences -- into database tables.

JPA-annotated entities for SwiftMessage, blocks, and fields
Ready for use with Hibernate, EclipseLink, or any JPA provider
Full message structure preserved in the relational model
Query messages by type, sender, receiver, field values, and more
All MT Message Categories
Complete coverage of all SWIFT FIN MT message types across every category, with yearly SRG updates.

Category 1 -- Customer Payments

MT101, MT103, MT103STP, MT103REMIT, MT104, MT107, and related messages for customer payment instructions and notifications.

Category 2 -- Financial Institution Transfers

MT200, MT202, MT202COV, MT203, MT204, MT205, MT205COV for bank-to-bank transfers and cover payments.

Category 3 -- FX & Derivatives

MT300, MT304, MT305, MT306, MT320, MT330, MT340, MT350 for foreign exchange, money markets, and derivatives.

Category 4 -- Collections & Cash Letters

MT400, MT405, MT410, MT412, MT416, MT420, MT422, MT450, MT455, MT456 for documentary collections.

Category 5 -- Securities

MT502-MT599 for securities settlement, corporate actions, collateral management, and reporting. Includes complex sequence-based messages.

Categories 6-9

Trade finance (7xx), travellers cheques (8xx), cash management (9xx including MT940, MT942, MT950), plus system messages (0xx) and common group messages (nxx).

Library Specifications

Library

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

Capabilities

Coverage: All SWIFT FIN MT message types
Parsing: FIN, RJE, ACK/NAK
Serialization: FIN, JSON, proprietary XML
Persistence: JPA entity model included
Validation: BIC and IBAN utilities
Get started with Prowide Core
Free and open source under the Apache 2.0 license. Add the dependency, parse your first message, and start building.