Message reference

pain.001.001.03: XSD, Example and Format Reference

pain.001.001.03 is the version SEPA and CGI standardised on. Element structure, version notes, and version migration.

pain.001.001.03 (2009) is the version the world standardised on. The SEPA credit transfer implementation guidelines and the CGI-MP corporate templates were built against it, SAP and Oracle ERP payment formats target it, and most bank corporate channels still accept it today. If your bank documentation says simply “pain.001”, it usually means this.

New to the format? What is pain.001? explains the message, its structure and every version.

What to know about this version#

  • Financial institutions are identified with <BIC>. Note that from version 9 the element is renamed <BICFI>, a frequent cause of rejection when upgrading.
  • Postal addresses are commonly supplied unstructured here; when regenerating for CBPR+ flows, migrate to a structured or hybrid address in a later version.
  • The natural migration target is pain.001.001.09; Pain001's migrate_records handles the element renames for you.

Element structure (all versions share this skeleton)#

  • <GrpHdr> Group Header: message id, creation timestamp, NbOfTxs, CtrlSum, initiating party. Pain001 recomputes the control totals from validated records.
  • <PmtInf> Payment Information: debtor, debtor account and agent, requested execution date, payment method, charge bearer; one block can carry many transactions.
  • <CdtTrfTxInf> Credit Transfer Transaction: amount and currency, creditor, creditor account and agent, remittance information, end-to-end reference.

XSD, element reference and examples#

  • Official XSD: ISO publishes the pain.001.001.03 schema in its message catalogue. The open-source pain001 library ships the same XSD and validates every file it generates against it.
  • Element reference: every path, type, cardinality and code list, generated from that XSD: pain.001.001.03 element reference.
  • Example files: XSD-valid files covering this version's elements, in the example corpus.

Generate and inspect#

pain001 init pain.001.001.03 -o payments.csv  # write a starter CSV
pain001 inspect pain.001.001.03               # template, schema, input formats
pain001 -t pain.001.001.03 -d payments.csv -o out/ --dry-run

Records can be reshaped between supported versions. The mapper renames and defaults fields to match the target version; elements the target does not model are not carried over, so re-validate after migrating:

from pain001.migration import VersionMapper
rows = VersionMapper().migrate_rows(
    rows, "pain.001.001.03", "pain.001.001.09"
)

See the full version catalogue, or the glossary for the vocabulary used here.