pacs.004.001.09 XSD schema and business logic
Learn how to generate valid pacs.004.001.09 messages for your ISO 20022 message-based integration to Mambu Payments.
A pacs.004.001.09 is a Payment Return message, used by a financial institution to return funds from a previously received credit transfer (pacs.008) or direct debit collection (pacs.003). A return may be initiated by Mambu Payments following rejection by the creditor, or by the customer to return an incoming payment.
Mambu Payments supports the following return types:
- Return of a received credit transfer (pacs.008)
- Return of a received direct debit collection (pacs.003)
1. Message usage, definition and structure
1.1. Usage of a return of a credit transfer
--- Case 1: spontaneous return ---
pacs.008 → [FI to FI Customer Credit Transfer] (original incoming payment received)
↓
pacs.004 ← [Payment Return] (Mambu Payments returns funds)
↓
pacs.002 ← [Payment Status Report]
--- Case 2: following a cancellation request ---
pacs.008 → [FI to FI Customer Credit Transfer] (original incoming payment received)
↓
camt.056 → [Cancellation Request] (cancellation request received)
↓
camt.029 ← [Resolution Response] (Mambu Payments sends positive reponse
| to the cancellation request)
↓
pacs.004 ← [Payment Return] (Mambu Payments returns funds)
↓
pacs.002 ← [Payment Status Report]
--- Case 1: spontaneous return ---
pacs.008 → [FI to FI Customer Credit Transfer] (original payment order settled)
↓
pacs.004 ← [Payment Return] (Mambu Payments receives returned funds)
--- Case 2: following a cancellation request ---
pacs.008 → [FI to FI Customer Credit Transfer] (original payment order settled)
↓
camt.056 → [Cancellation Request] (Mambu Payments sends a cancellation
| request)
↓
camt.029 ← [Resolution Response] (Positive reponse to the cancellation
| request received)
↓
pacs.004 ← [Payment Return] (Mambu Payments receives returned funds)
1.2. Usage of a return of a direct debit collection
pacs.003 → [FI to FI Customer Direct Debit] (original incoming collection settled)
↓
pacs.004 ← [Payment Return] (Mambu Payments returns collection)
↓
pacs.002 ← [Payment Status Report]
pacs.003 → [FI to FI Customer Direct Debit] (original payment collection settled)
↓
pacs.004 ← [Payment Return] (Mambu Payments receives collection return)
1.3. XSD definition and structure
The XSD message is available here.
A simplified structure is shown below:
Document
└── PmtRtr ← Root: Payment Return
├── GrpHdr [1..1] ← Group Header (mandatory)
│ ├── MsgId ← Message ID, text 1..35
│ ├── CreDtTm ← Creation date/time, ISODateTime
│ ├── NbOfTxs ← Number of transactions
│ ├── TtlRtrdIntrBkSttlmAmt [0..1] ← Total returned interbank settlement amount
│ ├── IntrBkSttlmDt [0..1] ← Interbank settlement date (optional)
│ ├── SttlmInf [1..1] ← Settlement Information (mandatory)
│ │ ├── SttlmMtd ← Settlement method (e.g. CLRG)
│ │ └── ClrSys [0..1] ← Clearing System (optional)
│ │ ├── Cd ← ISO code, text 1..4 (exclusive with Prtry)
│ │ └── Prtry ← Proprietary code, text 1..35
│ ├── InstgAgt [0..1] ← Instructing Agent / sender (optional)
│ │ └── FinInstnId
│ │ ├── BICFI ← BIC of instructing agent
│ │ └── ClrSysMmbId ← Clearing system member ID
│ └── InstdAgt [0..1] ← Instructed Agent / receiver (optional)
│ └── FinInstnId
│ ├── BICFI
│ └── ClrSysMmbId
└── TxInf [1..n] ← Transaction Information (1 or more)
├── RtrId ← Return ID, text 1..35 (mandatory)
├── OrgnlGrpInf [0..1] ← Original Group Information (optional)
│ ├── OrgnlMsgId ← Original message ID, text 1..35
│ └── OrgnlMsgNmId ← Original message name, e.g. pacs.008
├── OrgnlInstrId [0..1] ← Original Instruction ID (optional)
├── OrgnlEndToEndId [0..1] ← Original End-to-end ID (optional)
├── OrgnlTxId [0..1] ← Original Transaction ID (optional)
├── OrgnlUETR [0..1] ← Original UETR, UUID v4 (optional)
├── OrgnlIntrBkSttlmAmt [0..1] ← Original interbank settlement amount
├── OrgnlIntrBkSttlmDt [0..1] ← Original interbank settlement date
├── RtrdIntrBkSttlmAmt [1..1] ← Returned interbank settlement amount (mandatory)
├── RtrdIntrBkSttlmDt [0..1] ← Returned settlement date (optional)
├── RtrRsnInf [0..n] ← Return Reason Information (mandatory in Mambu Payments)
│ ├── Orgtr [0..1] ← Originator of the return reason (optional)
│ │ └── Nm ← Name
│ └── Rsn [0..1] ← Reason (Cd XOR Prtry)
│ ├── Cd ← ISO ExternalReturnReason1Code
│ └── Prtry ← Proprietary reason code, text 1..35
├── OrgnlTxRef [0..1] ← Original Transaction Reference (optional)
│ ├── IntrBkSttlmAmt ← Original settlement amount
│ ├── IntrBkSttlmDt ← Original settlement date
│ ├── Dbtr [0..1] ← Original Debtor
│ │ └── Nm
│ ├── DbtrAcct [0..1] ← Original Debtor Account
│ │ └── Id
│ │ ├── IBAN
│ │ └── Othr
│ ├── DbtrAgt [0..1] ← Original Debtor Agent
│ │ └── FinInstnId
│ │ ├── BICFI
│ │ └── ClrSysMmbId
│ ├── CdtrAgt [0..1] ← Original Creditor Agent
│ │ └── FinInstnId
│ │ ├── BICFI
│ │ └── ClrSysMmbId
│ ├── Cdtr [0..1] ← Original Creditor
│ │ └── Nm
│ └── CdtrAcct [0..1] ← Original Creditor Account
│ └── Id
│ ├── IBAN
│ └── Othr
└── SplmtryData [0..n] ← Supplementary data (optional)
2. Business logic
2.1. Return identification
A return is identified by the Return Information block inside TxInf. It must reference the original payment it is returning.
<PmtRtr>
<TxInf>
<RtrId></RtrId> <!-- Return ID, mandatory, text 1..35 -->
<OrgnlGrpInf>
<OrgnlMsgId></OrgnlMsgId> <!-- Original message ID, text 1..35 -->
<OrgnlMsgNmId>pacs.008</OrgnlMsgNmId> <!-- Original message name, either pacs.008 oar pacs.003 -->
</OrgnlGrpInf>
<OrgnlInstrId></OrgnlInstrId> <!-- original payment instruction ID -->
<OrgnlEndToEndId></OrgnlEndToEndId> <!-- original payment end-to-end ID -->
<OrgnlTxId></OrgnlTxId> <!-- original payment transaction ID -->
<OrgnlUETR></OrgnlUETR> <!-- original payment UETR -->
</TxInf>
</PmtRtr>| Field | Tag | Required | Description |
|---|---|---|---|
| Return ID | <RtrId> | Mandatory | Unique reference assigned by the returning agent to identify this return. Text 1..35. |
| Original message ID | <OrgnlGrpInf><OrgnlMsgId> | Mandatory | The MsgId of the original pacs.008 or pacs.003 message being returned. |
| Original message name | <OrgnlGrpInf><OrgnlMsgNmId> | Mandatory | The message type of the original message, e.g. pacs.008 or pacs.003. |
| Original end-to-end ID | <OrgnlEndToEndId> | Optional | The EndToEndId of the original payment transaction. |
| Original transaction ID | <OrgnlTxId> | Optional | The TxId of the original payment transaction. |
| Original instruction ID | <OrgnlInstrId> | Optional | The InstrId of the original payment transaction. |
| Original UETR | <OrgnlUETR> | Optional | The UETR of the original payment transaction, UUID v4. |
Mambu Payments uses the same priority lookup logic as for pacs.002 to match a return to the original payment. See pacs.002 — identification of original payment for the priority table.
2.2. Returned amount and settlement date
Declare the returned amount and, where applicable, the settlement date inside TxInf.
<PmtRtr>
<TxInf>
<RtrdIntrBkSttlmAmt Ccy="EUR">1000.00</RtrdIntrBkSttlmAmt> <!-- mandatory -->
<RtrdIntrBkSttlmDt>2025-06-01</RtrdIntrBkSttlmDt> <!-- optional -->
<OrgnlIntrBkSttlmAmt Ccy="EUR">1000.00</OrgnlIntrBkSttlmAmt> <!-- optional -->
<OrgnlIntrBkSttlmDt>2025-05-30</OrgnlIntrBkSttlmDt> <!-- optional -->
</TxInf>
</PmtRtr>| Field | Tag | Required | Description |
|---|---|---|---|
| Returned settlement amount | <RtrdIntrBkSttlmAmt> | Mandatory | The amount being returned, with currency attribute (Ccy). Must not exceed the original settlement amount. |
| Returned settlement date | <RtrdIntrBkSttlmDt> | Optional | The date on which the return is settled between the agents. ISO date format. |
| Original settlement amount | <OrgnlIntrBkSttlmAmt> | Optional | The interbank settlement amount of the original payment, for reconciliation purposes. |
| Original settlement date | <OrgnlIntrBkSttlmDt> | Optional | The settlement date of the original payment. |
2.3. Return reason
Declare the reason for the return inside the <RtrRsnInf> block within TxInf. Mambu Payments requires a return reason on all outgoing returns. <Cd> and <Prtry> are mutually exclusive — only one must be present.
<PmtRtr>
<TxInf>
<RtrRsnInf>
<Orgtr> <!-- optional: identifies who initiated the return -->
<Nm>Returning Agent Name</Nm>
</Orgtr>
<Rsn> <!-- only one of Cd or Prtry must be present -->
<Cd></Cd> <!-- ISO ExternalReturnReason1Code, e.g. AC04, FOCR -->
<Prtry></Prtry> <!-- Proprietary reason code, text 1..35 -->
</Rsn>
</RtrRsnInf>
</TxInf>
</PmtRtr>| Field | Tag | Required | Description |
|---|---|---|---|
| Return reason code | <Rsn><Cd> | Conditional | ISO ExternalReturnReason1Code. Mutually exclusive with <Prtry>. See common codes below. |
| Proprietary reason | <Rsn><Prtry> | Conditional | Scheme-specific or bilateral return reason, text 1..35. Mutually exclusive with <Cd>. |
| Originator | <Orgtr><Nm> | Optional | Name of the party (individual or organisation) that initiated the return. |
Common return reason codes:
| Code | Description | Definition |
|---|---|---|
AC04 | Closed account number | Account has been closed |
AC06 | Blocked account | Account is blocked |
AM09 | Wrong amount | Amount received is not the amount agreed |
CUST | Requested by customer | Return requested by end customer |
DUPL | Duplicate payment | Payment is a duplicate of another transaction |
FOCR | Following cancellation request | Return initiated following a camt.056 cancellation request |
FRAD | Fraudulent origin | Fraudulent payment |
MS02 | Not specified reason, customer generated | Return by order of the beneficiary, no further reason |
NARR | Narrative | Reason provided in narrative form via <AddtlInf> |
TECH | Technical problem | Technical error in the original payment |
2.4. Original transaction reference
Optionally repeat key fields from the original payment inside the <OrgnlTxRef> block. This allows the receiving party to reconcile the return without looking up the original message.
<PmtRtr>
<TxInf>
<OrgnlTxRef>
<IntrBkSttlmAmt Ccy="EUR">1000.00</IntrBkSttlmAmt>
<IntrBkSttlmDt>2025-05-30</IntrBkSttlmDt>
<Dbtr>
<Nm>Original Debtor Name</Nm>
</Dbtr>
<DbtrAcct>
<Id><IBAN>DE89370400440532013000</IBAN></Id>
</DbtrAcct>
<DbtrAgt>
<FinInstnId><BICFI>DEUTDEDB</BICFI></FinInstnId>
</DbtrAgt>
<CdtrAgt>
<FinInstnId><BICFI>BNPAFRPP</BICFI></FinInstnId>
</CdtrAgt>
<Cdtr>
<Nm>Original Creditor Name</Nm>
</Cdtr>
<CdtrAcct>
<Id><IBAN>FR7630006000011234567890189</IBAN></Id>
</CdtrAcct>
</OrgnlTxRef>
</TxInf>
</PmtRtr>All fields within <OrgnlTxRef> are optional. Include as many as are available from the original payment to assist downstream reconciliation.
