Understand the distinction: a RJCT (reject) is issued before the payment is settled (typically same day) because the payment fails validation; a RTRN (return) is issued after settlement when the beneficiary bank cannot apply the funds.
Parse the XML pain.002 CustomerPaymentStatusReport for RJCT messages — extract the 'ReasonCode' element to determine the rejection reason (e.g., AC01 for incorrect account number, AM04 for insufficient funds).
For RTRN messages (received in a pacs.004 PaymentReturn message), extract the return reason code and the original transaction reference to match against your payment ledger.
On RJCT, the payment has not left your account — reverse the debit in your ledger and notify the sender immediately; funds are not at risk.
On RTRN, the payment has settled and been returned; reconcile the returned credit to your account and update the payment record status; notify the originating party.
Map ISO 20022 return reason codes to human-readable descriptions for customer notification; maintain a lookup table of the codes relevant to your payment types.
Known gotchas
RTRN messages may arrive days after the original payment settled — build your reconciliation system to handle late-arriving returns rather than assuming settlement is final on day one.
Not all reason codes are used consistently across all EPC member banks — some banks return a generic code where a specific one would be more informative; do not rely solely on reason codes for automated routing decisions.
SEPA Instant Credit Transfer (SCT Inst) has different timing characteristics for rejects and returns than standard SEPA Credit Transfer — if you process both rail types, handle the message timings separately.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp