Convert MT103 to pacs.008 records
convert_mt103Convert a legacy SWIFT MT103 message into a flat pacs.008 record for ISO 20022 migration. Parses MT103 text and returns a single record ready for validation and message generation.
Instructions
Convert a legacy SWIFT MT103 into pacs.008-ready flat records.
This is the SWIFT MT-to-MX migration path (correspondent-banking MT103
coexistence with ISO 20022 ends November 2025): parse an MT103 text
payload and get back the flat pacs.008 record(s) that can be fed straight
into ``validate_records`` / ``generate_message``. An MT103 carries exactly
one transfer, so the ``records`` list always holds a single record. No
file is read or written.
Returns ``{"message_type": "pacs.008.001.08", "records": [{...}]}`` with
the parsed flat record, or an ``{"error": ...}`` payload if the MT103 is
missing a mandatory field (``:20:``, ``:32A:``, beneficiary) or malformed.
Args:
mt103_text: The MT103 payload as a string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mt103_text | Yes | A legacy SWIFT MT103 (single customer credit transfer) payload as text. A raw '{4:...-}' block-4 envelope, trailing whitespace and CRLF/LF differences are tolerated. |