Payments Academy
BAHDocumentFIToFICstmrCdtTrfGrpHdrPmtInfCdtTrfTxInfpacs.008 message structureBAHDocumentFIToFICstmrCdtTrfGrpHdrPmtInfCdtTrfTxInf
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08">
  <FIToFICstmrCdtTrf>
    <GrpHdr>
      <MsgId>ACME2026110501</MsgId>
      <CreDtTm>2026-11-05T09:00:00</CreDtTm>
      <NbOfTxs>1</NbOfTxs>
      <CtrlSum>10000</CtrlSum>
      <InitgPty><Nm>Acme Trading Ltd</Nm></InitgPty>
    </GrpHdr>
    <PmtInf>
      <PmtInfId>PmtInf001</PmtInfId>
      <PmtMtd>TRF</PmtMtd>
      <ReqdExctnDt>2026-11-05</ReqdExctnDt>
      <ChrgBr>SHAR</ChrgBr>
      <Dbtr>
        <Nm>Acme Trading Ltd</Nm>
        <PstlAdr><TwnNm>London</TwnNm></PstlAdr>
      </Dbtr>
      <DbtrAcct><Id><Othr><Id>London current account</Id></Othr></Id></DbtrAcct>
      <DbtrAgt><FinInstnId><Nm>London bank</Nm></FinInstnId></DbtrAgt>
      <CdtTrfTxInf>
        <PmtId><InstrId>Instr001</InstrId><EndToEndId>INV4567</EndToEndId><UETR>a1b2c3d4-e5f6-4789-abcd-ef0123456789</UETR><TxId>TXN2026110501</TxId></PmtId>
        <InstdAmt Ccy="USD">10000</InstdAmt>
        <SttlmInf><SttlmMtd>INDA</SttlmMtd></SttlmInf>
        <CdtrAgt><FinInstnId><Nm>Singapore bank</Nm></FinInstnId></CdtrAgt>
        <Cdtr>
          <Nm>Meridian Supplies Pte Ltd</Nm>
          <PstlAdr><TwnNm>Singapore</TwnNm></PstlAdr>
        </Cdtr>
        <CdtrAcct><Id><Othr><Id>Singapore account</Id></Othr></Id></CdtrAcct>
        <Purp><Cd>SUPP</Cd></Purp>
        <RmtInf><Strd><CdtrRefInf><Ref>4567</Ref></CdtrRefInf></Strd></RmtInf>
      </CdtTrfTxInf>
    </PmtInf>
  </FIToFICstmrCdtTrf>
</Document>

Example: pacs.008.001.08 (explorer scheme_version). Versions listed in the explorer: pacs.008.001.06, pacs.008.001.08, pacs.008.001.09, pacs.008.001.10. Shortened for display from the chapter walkthrough: one PmtInf and one CdtTrfTxInf, Acme Trading Ltd pays Meridian Supplies Pte Ltd 10000 USD for invoice 4567. This is the base ISO 20022 structure. Scheme rules add to it: under CBPR+ the message must carry a UETR and fully structured debtor and creditor addresses, and under SEPA SCT the charge bearer must be SLEV only. The chapter example names the agents only as the London bank and the Singapore bank, so no BIC is shown. The UETR value shown is illustrative; the chapter names no UETR value.

0:00 / 3:37 Step 1 of 5

System design deep dive: processing pacs.008 at scale

pacs.008 Deep Dive, Lesson 8 of 8, Narration 3:37, D04 Messaging and standards

Streaming parserUsage guidelineMapping engine

What you will learn

Your objective. By the end of this lesson, you will be able to explain system design deep dive: processing pacs.008 at scale and apply it to a real banking scenario.

Why it matters. This matters because the message is the payment instruction. A wrong field, a missing element or a misunderstood format is a failed payment, a return, or a compliance breach.

Chapter objective: After this lesson the learner can read a pacs.008 message block by block, explain each field in business terms, and spot the errors that get a message rejected.

Key learning points

  • Thousands per second
  • How that is possible
  • Parsing, validation, storage, mapping
  • Performance is a design choice
  • Fields that do not fit

Key terms

Streaming parser: A parser that reads XML element by element instead of loading the whole document into memory.

Usage guideline: The scheme or clearing system rules that define which fields are mandatory, optional or restricted.

Mapping engine: The data driven component that converts between formats, such as pacs.008 to MT103, using mapping tables.

A pipeline strip shows parsing, validation, storage and mapping stages beside the message structure.

Practise this lesson

Exercise

Read the pacs.008 message described in this lesson and identify its key parts.

Use the message structure, fields and example in this lesson.

  1. What to do. List the three levels of the message and name the field that carries the amount and the field that carries the end-to-end reference.

Correct result. The amount is carried in the instructed amount element and the reference in the end-to-end identification. The three levels are the group header, the payment information, and the credit transfer transaction information.

Why. A message is only useful if you can read it. The group header identifies the message, the payment information identifies the batch, and the transaction information carries the single payment.

Check your understanding

Practice question

Which of the following best describes system design deep dive: processing pacs.008 at scale?

Takeaway and next step

What to remember

This transparency is essential, because a silent mapping change could alter the payment in a way the customer never intended.

Open the message type from this lesson and inspect its fields, then find the field that carries the amount.

Open the ISO 20022 Message Explorer →

Builds on "Common errors and validation in pacs.008".

Transcript and full text

Show transcript

XML parsing at volume starts with streaming parsers rather than loading whole documents into memory. A pacs.008 can be several kilobytes long, and a bank may receive 2,000 to 5,000 messages per second during peak hours, so the parser must process each message in a few milliseconds. Streaming parsers read the XML element by element, extract the fields the engine needs, and discard the rest, which keeps memory use flat even under burst load. Parsing is done in parallel across worker threads, and malformed XML is rejected immediately with a precise error location. This approach avoids the memory spikes and slowdowns that come from building a full document tree for every message. After parsing, each message is validated against the usage guidelines published for the scheme or clearing system that will carry it. These guidelines define which fields are mandatory, which are optional, and which values are allowed for a given payment type. The validator checks the message structure, the data types, the code lists, and the business rules, such as the maximum amount for a given scheme or the required agent details for a cross border payment. Validation failures are collected in a single error report, so the sender receives all problems at once instead of fixing them one by one. Valid messages move on to processing, while invalid ones are returned with a structured rejection that names the failing field. Banks store ISO 20022 messages in two forms. The structured data, such as debtor, creditor, amount, currency, and references, is stored in relational tables for fast searching and reporting. The full original XML is stored separately, either as a compressed blob in the database or in an object store, with a reference from the structured record. This dual storage keeps queries fast while preserving the exact message that was received, which matters for audits and disputes. Retention is typically seven to ten years, and older messages are moved to cheaper archival storage with the same retrieval key, so an investigation can still find a message from five years ago in seconds. The mapping engine converts between formats, for example from ISO 20022 pacs.008 to a legacy MT103, or from a domestic format to pacs.008. It uses a mapping table that defines how each source field maps to a target field, including format changes, code translations, and default values. The engine is data driven, so adding a new mapping does not require a code release, only a configuration change that is tested and approved. When a field has no direct equivalent, the engine applies a rule, such as truncating a long name or splitting an address across lines, and records what it did. This transparency is essential, because a silent mapping change could alter the payment in a way the customer never intended. Performance and truncation are handled together. The engine is tuned to process a pacs.008 end to end in under 50 milliseconds, with database writes batched and indexes kept narrow so inserts stay fast. When a field is longer than the target system allows, for example a 140 character remittance field going into a 35 character legacy field, the engine truncates from the right, keeps the first characters, and logs the truncation with the original value preserved in the archive. The customer reference is never truncated, because losing it would break reconciliation. Load tests run at 150 percent of expected peak, and any release that pushes average processing time above the target is held back until it is fixed.

XML parsing at volume starts with streaming parsers rather than loading whole documents into memory. A pacs.008 can be several kilobytes long, and a bank may receive 2,000 to 5,000 messages per second during peak hours, so the parser must process each message in a few milliseconds. Streaming parsers read the XML element by element, extract the fields the engine needs, and discard the rest, which keeps memory use flat even under burst load. Parsing is done in parallel across worker threads, and malformed XML is rejected immediately with a precise error location. This approach avoids the memory spikes and slowdowns that come from building a full document tree for every message.

After parsing, each message is validated against the usage guidelines published for the scheme or clearing system that will carry it. These guidelines define which fields are mandatory, which are optional, and which values are allowed for a given payment type. The validator checks the message structure, the data types, the code lists, and the business rules, such as the maximum amount for a given scheme or the required agent details for a cross border payment. Validation failures are collected in a single error report, so the sender receives all problems at once instead of fixing them one by one. Valid messages move on to processing, while invalid ones are returned with a structured rejection that names the failing field.

Banks store ISO 20022 messages in two forms. The structured data, such as debtor, creditor, amount, currency, and references, is stored in relational tables for fast searching and reporting. The full original XML is stored separately, either as a compressed blob in the database or in an object store, with a reference from the structured record. This dual storage keeps queries fast while preserving the exact message that was received, which matters for audits and disputes. Retention is typically seven to ten years, and older messages are moved to cheaper archival storage with the same retrieval key, so an investigation can still find a message from five years ago in seconds.

The mapping engine converts between formats, for example from ISO 20022 pacs.008 to a legacy MT103, or from a domestic format to pacs.008. It uses a mapping table that defines how each source field maps to a target field, including format changes, code translations, and default values. The engine is data driven, so adding a new mapping does not require a code release, only a configuration change that is tested and approved. When a field has no direct equivalent, the engine applies a rule, such as truncating a long name or splitting an address across lines, and records what it did. This transparency is essential, because a silent mapping change could alter the payment in a way the customer never intended.

Performance and truncation are handled together. The engine is tuned to process a pacs.008 end to end in under 50 milliseconds, with database writes batched and indexes kept narrow so inserts stay fast. When a field is longer than the target system allows, for example a 140 character remittance field going into a 35 character legacy field, the engine truncates from the right, keeps the first characters, and logs the truncation with the original value preserved in the archive. The customer reference is never truncated, because losing it would break reconciliation. Load tests run at 150 percent of expected peak, and any release that pushes average processing time above the target is held back until it is fixed.

Full lesson text (all scenes)

Completing a lesson updates your progress dashboard on the homepage.

Scene timestamps are estimated by allocating the narration text proportionally across the real audio length. The audio playback position is the source of truth: pause freezes the visual, seeking restores the correct scene, replay restarts the scene animation.

Scene beat timestamps for this lesson were measured from the real audio, not estimated.