Map ISO 20022 pain.002 Customer Payment Status Report codes to internal payment states
domain: iso20022.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
After submitting a pain.001 Customer Credit Transfer Initiation batch, expect an asynchronous pain.002 response reporting group-level and/or transaction-level status.
Parse the Group Status applying to the whole file/batch separately from individual Transaction Status entries applying to specific instructions within it — a single pain.002 can carry both.
Map the status-reason codes you receive (e.g., ACCP, ACSC, ACSP, PDNG, RJCT) to your internal payment lifecycle states, treating RJCT specially since it always carries a reason code.
For rejections, read the associated status-reason information to drive customer-facing error messages and decide whether to auto-retry or require manual correction.
Reconcile each pain.002 back to its originating pain.001 batch and instruction using the shared Original Message ID / Original End-to-End ID references rather than matching on amount alone.
Known gotchas
A pain.002 is not guaranteed for every submission — some banks send it only for rejections, so don't build a flow that blocks indefinitely waiting for an acceptance status that may never arrive.
The same status code can appear at both group and transaction level with different meanings — a group-level ACCP does not guarantee every individual transaction within it is also ACCP.
Exact code sets and required fields vary by market practice (e.g., SEPA vs. CBPR+) even though the base pain.002 schema is shared — confirm which implementation guide your bank follows.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?