Migration GuidesFrom In-House Scripts

Migrating from in-house scripts

Replace hand-written MT parsers and MT/ISO 20022 mapping scripts with transmute: what to compare, the pitfalls those scripts usually miss, and a safe side-by-side cut-over.

Most MT pipelines start as a script: a few regular expressions over :61: lines, a CSV export, a hand-maintained mapping to camt.053. This page is a plan for replacing that with transmute without a big-bang switch.

Measured on: transmute main at commit f460e0e (7 October 2026). Every output shown is reproducible with the commands below against that build.

1. Map your script's jobs

Your script…transmute
Splits blocks and tags, reads :20:, :25:, :60F:, :61:, :86:, :62F:POST /v1/normalize returns them as canonical JSON
Converts to camt.053 / pacs.008 / CSV for an accounting toolPOST /v1/convert (to=camt.053, pacs.008, csv-xero, ofx, qbo, qfx, …; see Formats)
Checks the result is well-formedPOST /v1/validate
Has a mapping table in codeDeclarative mapping tables, versioned by Standards Release; you send srVersion to pin one

2. Normalize the sample, compare with your script

curl -sS -X POST 'https://api.transmute.403fin.io/v1/normalize?from=mt940' \
  -H "Authorization: Bearer $TRANSMUTE_KEY" \
  -H 'Content-Type: text/plain' \
  --data-binary @- <<'EOF'
{1:F01AAAADEFFXXXX0000000000}{2:I940BBBBDEFFXXXXN}{4:
:20:STMT0001
:25:DE89370400440532013000
:28C:00042/001
:60F:C260601EUR1000,00
:61:2606020602C250,00NTRFNONREF//BANKREF1
:86:INVOICE 4711
:62F:C260602EUR1250,00
-}
EOF

The single entry comes back as:

{
  "amount": { "amount": "250.00", "currency": "EUR" },
  "creditDebit": "CRDT",
  "status": "BOOK",
  "bookingDate": "2026-06-02",
  "valueDate": "2026-06-02",
  "bankTxCode": { "domain": "PMNT", "family": "RCDT", "subFamily": "ESCT", "proprietary": "NTRF" },
  "references": { "acctSvcrRef": "BANKREF1" },
  "remittance": { "unstructured": ["INVOICE 4711"] }
}

with "warnings": []. Run your script on the same input and diff the values you rely on.

3. Pitfalls scripts commonly miss

Check your script against each; these are the places side-by-side runs usually disagree.

PitfallWhat transmute does
Comma decimals (1250,00) parsed as floatsAmounts stay decimal strings ("1250.00") end to end; never floats
:61: with or without the entry date, RC/RD reversal marks, the // bank referenceParsed per field grammar; an RC entry comes back as "creditDebit": "DBIT" with "reversal": true
:86: structured with ?nn sub-fields (German GVC style: a three-digit transaction code, ?20–?29 remittance, ?32/?33 counterparty name)Parsed automatically on input into remittance, counterparty and bankTxCode; field86Profile (plain or german) chooses how :86: is written when MT940/MT942 is the target
Long statements split across several messages (:28C: sequence, :60M:/:62M: balances)Each message is processed on its own; on MT targets, long output is split into pages (meta.pages)
Non-ASCII names on MT outputTransliterated to the SWIFT X character set with a warning (or an error with options.strict)
A field that does not fit the targetA lossy warning naming the source and target field, never a silent truncation

4. Cut over safely

  1. Run both for a full statement cycle on one account; compare balances, entry counts and amounts.
  2. Gate on warnings: fail or route to review on lossy, accept known info codes (for example MISSING_REQUIRED_DEFAULTED for the camt.053 creation timestamp an MT940 does not carry).
  3. Pin srVersion or X-Api-Version so output only changes when you choose (SR2025 to SR2026).
  4. Replace the script per flow; keep it runnable until the last flow has moved.

Privacy posture: transmute never logs message content and keeps it only briefly (the 24-hour idempotency cache when you send the header, and batch results until the job TTL), so keep your own copies of anything you need for audit.

"SWIFT" is a trademark of S.W.I.F.T. SCRL. transmute converts SWIFT MT messages; it is not affiliated with, endorsed by, or certified by SWIFT. Xero, QuickBooks and Quicken are trademarks of their respective owners; the csv-xero, qbo and qfx targets produce import files for those products, and transmute is not affiliated with or endorsed by them.