Validate ISO 20022 payment files (pain, camt, pacs)
ISO 20022 payment and cash-management messages are XML files validated against the message's XSD. Before a payment file goes to the bank — or when a bank rejects it — check it against the schema of the exact version you send.
| Message | Use |
|---|---|
| pain.001 | customer credit transfer initiation (payment orders, SEPA credit transfer) |
| pain.008 | customer direct debit initiation (SEPA direct debit) |
| pain.002 | payment status report from the bank |
| camt.053 / camt.054 | account statement / debit-credit notification |
| pacs.008 | interbank customer credit transfer |
How
- Get the XSD for your message version from the
ISO 20022 message catalogue or your bank's implementation guide
(for SEPA, the EPC rulebook schemas). The version is in the file's namespace, e.g.
urn:iso:std:iso:20022:tech:xsd:pain.001.001.09. - Load the XML file, then the XSD.
- Read the errors in the list or the Excel report; each links to an explanation.
Frequent errors in payment files
- Characters outside the allowed set or names too long → pattern mismatch, string length.
- Amounts with more than two decimals → too many digits.
- Wrong message version: the namespace says
.001.03but the bank expects.001.09→ no matching global declaration. - Missing
CtrlSum,NbOfTxsor other mandatory group header fields → missing child element.
To explore the message structure as a diagram, open the XSD in the XSD Viewer.
Questions
Does schema validation guarantee my bank accepts the file?
No. The XSD checks structure, types, lengths and code lists. Banks and schemes add rules in their implementation guides (MIGs) — mandatory fields, allowed characters, business checks — that only their own validator knows. A file that fails the XSD will be rejected, though, so this is the first check.