StmtRecon
MT940 fields and statement controls

Extract EREF+, MREF+ and CRED+ from MT940

These SEPA narrative markers identify the end-to-end payment, mandate and creditor respectively. They support different joins in the collections register, where one mandate can cover many debits.

Open this sample in Air-Gapped Converter

Worked bank sample

Synthetic bank data for local reconciliation.

:20:REPORT-1
:25:EUR-OPERATING
:28C:007/1
:60F:C261130EUR100,00
:61:261130C25,00NDDTCOL-084//BANK-084
:86:EREF+COL-084 MREF+MDT-006 CRED+DE98ZZZ09999999999
:62F:C261130EUR125,00

Field anatomy

Field or pathMeaning in this fileType or formatERP or Excel import risk
EREF+End-to-end referenceIdentifier textA mandate key collapses different collections.
MREF+ / CRED+Mandate / creditor identifiersSeparate stringsJoining across creditors can clear the wrong debtor.

Root cause and ERP fix

  1. The suffix after EREF+ became a single key. Stop at the next recognised marker.
  2. A mandate reference was reused by another creditor. Use the mandate and creditor as a pair.
  3. An end-to-end value is a placeholder. Match using the bank reference and original collection evidence.

Inspect with the MIT parser

Save the sample as mt940-sepa-eref-mref-cred.sta and the script as inspect.mjs. With @stmtrecon/parser installed, run node inspect.mjs mt940-sepa-eref-mref-cred.sta.

import { readFile } from 'node:fs/promises';
import { inspect } from '@stmtrecon/parser';
const text = await readFile(process.argv[2], 'utf8');
const report = inspect(text, { transactions: true });
const rows = report.transactions;
const markers = /\b(EREF|MREF|CRED)\+(.+?)(?=\s+(?:EREF|MREF|CRED)\+|$)/g;
console.log(Object.fromEntries([...rows[0].narrative.matchAll(markers)].map(m => m.slice(1))));
Open this sample in Air-Gapped Converter

Export a multi-sheet Excel workbook with balance checks and batch reconciliation on your device. No Node installation or cloud upload is required.

npm package · SDK source · Format reference

Related MT940 fields and statement controls

Export your full workbook

Purchases are currently unavailable. Existing licenses can be activated offline.