Parse a camt.053 Bank Statement into Reconciliation Data
Skill: Convert an ISO 20022 camt.053 end-of-day statement into postable cash-application data
Region: Global (cross-border ISO 20022 standard)
Category: Banking — ISO 20022 camt.053 Bank-to-Customer Statement
Does: Takes an ISO 20022 camt.053.001.08 end-of-day bank statement (XML) and extracts a flat, postable reconciliation dataset — the Statement → Balance → Entry → Entry Details → Transaction Details hierarchy, bank-transaction-code domain/family/subfamily, references (EndToEndId, AcctSvcrRef), and opening/closing balances.
Schema version: ISO 20022 camt.053.001.08 (Bank-to-Customer Statement)
The AI parses and structures the statement; it does not connect to your bank or ERP. Statement layouts vary by bank (proprietary
BkTxCd/Prtry,AddtlNtryInfformatting). Always reconcile the derived entry total back to the closing balance before posting.
When this applies
- Daily cash application — matching incoming receipts to open invoices (AR) and outgoing payments to bills (AP).
- Bank reconciliation — confirming book cash against the bank's closing balance.
- Migrating from MT940 to ISO 20022 camt.053 statements.
Parsing procedure
- Read the source — a
camt.053XML document. LocateBkToCstmrStmt/Stmt(there may be several<Stmt>per file, one per account/day). - Extract statement header — account IBAN/other ID, currency,
Stmt/Id,CreDtTm, statement/page numbers. - Extract balances — read every
<Bal>; captureOPBD(opening booked) andCLBD(closing booked), plusCdtDbtIndand amount. - Walk entries — for each
<Ntry>: amount,CdtDbtInd(CRDT/DBIT),Sts(BOOK/PDNG),BookgDt/ValDt,BkTxCd(Domn/Cd, Fmly/Cd, SubFmlyCd, orPrtry),AcctSvcrRef. - Walk transaction details — for each
<TxDtls>insideNtryDtls:Refs/EndToEndId, counterparty name (RltdPties), counterparty IBAN (RltdPties/.../IBAN), andRmtInf/Ustrdfor invoice matching. - Normalize — sign each amount (
+for CRDT,−for DBIT) into a single signed field; dates toYYYY-MM-DD; trim references. - Reconcile — opening balance + Σ signed booked entries must equal the closing balance; flag any gap.
- Emit — a structured JSON (or CSV) reconciliation dataset, per the worked example.
camt.053 → reconciliation field map
| camt.053 element | → Output field |
|---|---|
Stmt/Acct/Id/IBAN |
account.iban |
Stmt/Acct/Ccy |
account.currency |
Bal[Tp/CdOrPrtry/Cd=OPBD]/Amt |
balances.opening |
Bal[Tp/CdOrPrtry/Cd=CLBD]/Amt |
balances.closing |
Ntry/Amt + Ntry/CdtDbtInd |
entries[].amount (signed) |
Ntry/Sts/Cd |
entries[].status (BOOK/PDNG) |
Ntry/BookgDt/Dt |
entries[].bookingDate |
Ntry/ValDt/Dt |
entries[].valueDate |
Ntry/BkTxCd/Domn/Cd /Fmly/Cd /SubFmlyCd |
entries[].bankTxCode |
Ntry/NtryRef / AcctSvcrRef |
entries[].bankRef |
TxDtls/Refs/EndToEndId |
entries[].endToEndId |
TxDtls/RltdPties/.../Nm |
entries[].counterparty |
TxDtls/RltdPties/.../IBAN |
entries[].counterpartyIban |
TxDtls/RmtInf/Ustrd |
entries[].remittance |
Document structure (camt.053)
Document
└── BkToCstmrStmt
├── GrpHdr (MsgId, CreDtTm)
└── Stmt ...
├── Id, ElctrncSeqNb, CreDtTm
├── Acct (Id/IBAN, Ccy, Ownr)
├── Bal ... (OPBD opening, CLBD closing, ...)
└── Ntry ...
├── Amt (Ccy), CdtDbtInd, Sts
├── BookgDt, ValDt
├── BkTxCd (Domn/Fmly/SubFmly | Prtry)
└── NtryDtls/TxDtls
├── Refs (EndToEndId, AcctSvcrRef, InstrId)
├── RltdPties (Dbtr/Cdtr + accounts)
└── RmtInf (Ustrd / Strd)
Code tables
Balance type (Bal/Tp/CdOrPrtry/Cd)
| Code | Meaning |
|---|---|
OPBD |
Opening booked balance |
CLBD |
Closing booked balance |
OPAV / CLAV |
Opening / closing available balance |
FWAV |
Forward available balance |
Bank transaction code domains (BkTxCd/Domn/Cd)
| Code | Domain |
|---|---|
PMNT |
Payments |
ACMT |
Account management (e.g. interest) |
LDAS |
Loans, deposits, advances |
FORX |
Foreign exchange |
Family/subfamily examples (PMNT): RCDT/ESCT received SEPA credit transfer; ICDT/ESCT issued; RDDT/ESDD received direct debit.
Calculation rules
- Signed amount:
CRDT→ positive,DBIT→ negative. - Reconciliation invariant:
opening + Σ(signed booked entries) = closing. Pending (PDNG) entries are excluded from the booked reconciliation. - A multi-
TxDtls<Ntry>is a batch: the entryAmtequals Σ itsTxDtlsamounts; expand to individual lines for AR matching but keep the entry total for balance reconciliation.
Worked example (end-to-end)
Input — camt.053 statement (one credit entry)
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.08">
<BkToCstmrStmt>
<GrpHdr>
<MsgId>STMT-20260611</MsgId>
<CreDtTm>2026-06-12T02:00:00</CreDtTm>
</GrpHdr>
<Stmt>
<Id>STMT-DE21-20260611</Id>
<CreDtTm>2026-06-12T02:00:00</CreDtTm>
<Acct>
<Id><IBAN>DE21500500009876543210</IBAN></Id>
<Ccy>EUR</Ccy>
</Acct>
<Bal>
<Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp>
<Amt Ccy="EUR">10000.00</Amt>
<CdtDbtInd>CRDT</CdtDbtInd>
<Dt><Dt>2026-06-11</Dt></Dt>
</Bal>
<Bal>
<Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp>
<Amt Ccy="EUR">11500.00</Amt>
<CdtDbtInd>CRDT</CdtDbtInd>
<Dt><Dt>2026-06-11</Dt></Dt>
</Bal>
<Ntry>
<Amt Ccy="EUR">1500.00</Amt>
<CdtDbtInd>CRDT</CdtDbtInd>
<Sts><Cd>BOOK</Cd></Sts>
<BookgDt><Dt>2026-06-11</Dt></BookgDt>
<ValDt><Dt>2026-06-11</Dt></ValDt>
<BkTxCd>
<Domn>
<Cd>PMNT</Cd>
<Fmly><Cd>RCDT</Cd><SubFmlyCd>ESCT</SubFmlyCd></Fmly>
</Domn>
</BkTxCd>
<NtryDtls>
<TxDtls>
<Refs><EndToEndId>INV-7781</EndToEndId></Refs>
<RltdPties>
<Dbtr><Nm>Acme Supplies Ltd</Nm></Dbtr>
<DbtrAcct><Id><IBAN>DE89370400440532013000</IBAN></Id></DbtrAcct>
</RltdPties>
<RmtInf><Ustrd>Invoice INV-7781</Ustrd></RmtInf>
</TxDtls>
</NtryDtls>
</Ntry>
</Stmt>
</BkToCstmrStmt>
</Document>
Output — reconciliation dataset (JSON)
{
"account": { "iban": "DE21500500009876543210", "currency": "EUR" },
"balances": { "opening": 10000.00, "closing": 11500.00 },
"entries": [
{
"amount": 1500.00,
"status": "BOOK",
"bookingDate": "2026-06-11",
"valueDate": "2026-06-11",
"bankTxCode": "PMNT/RCDT/ESCT",
"endToEndId": "INV-7781",
"counterparty": "Acme Supplies Ltd",
"counterpartyIban": "DE89370400440532013000",
"remittance": "Invoice INV-7781"
}
],
"reconciliation": { "expectedClosing": 11500.00, "balances": true }
}
Reconciliation check: 10000.00 + 1500.00 = 11500.00 = closing → balances: true.
Validation checklist
- Every
<Stmt>in the file parsed (multi-statement files handled) -
OPBDandCLBDbalances captured with correct sign - Each
<Ntry>amount signed byCdtDbtInd;Stsrecorded (BOOK vs PDNG) - Batched entries: entry amount = Σ
TxDtls; individual lines expanded for AR matching -
EndToEndId/ remittance captured for invoice matching - opening + Σ booked entries = closing (discrepancy flagged, not hidden)
- Bank transaction codes mapped (domain/family/subfamily or proprietary)
Last updated: 2026-06-12 — confirm the camt.053 version (.08 vs .02) and your bank's proprietary BkTxCd/Prtry and AddtlNtryInf conventions before posting.