Return payments (pacs.004)

Prev Next

Returning payments with SEPA Instant Credit Transfer

This tutorial describes how you can return SEPA Instant Credit Transfer (SCT Inst) payments with the Payments Hub API and accompanies the header information found in the Return payments message tutorial

For this tutorial, consider a scenario where you have receive a SEPA Inst Payment from a relative in Madrid. It happens that he shouldn’t have send you the money and he is requesting via a camt.056 (Payment Cancellation Request) to have it returned. This tutorial describes how you can return a SCT Inst payment using the ISO pacs.004 message.

Sandbox

The instructions in this tutorial apply to the sandbox environment

Return payment

Request body

The request must include a JSON payload object in the request body. The JSON payload is a pacs.004 ISO message with the pmtRtr root element, and it contains the request details for returning a payment.

The following table only provides information about some especially important fields. For details on all the required and optional message fields, see Message field definition for pacs.004 .

Message field

Description

Data type

Required/Optional

grpHdr.nbOfTxs

Number of transactions within the message.

Value: 1

Number

Required

grpHdr.msgId

Message ID, which must uniquely identify each request you send.

This ID is used internally for idempotency of the API.

String

Required

grpHdr.creDtTm

Date and time of the payment return request

String

Required

grpHdr.sttlmInf.sttlmMtd

Settlement method.

Value: CLRG

String

Required

txInf.rtrId

Unique payment return ID for the end customer

String

Required

txInf.rtrdIntrBkSttlmAmt

Data structure containing the returned interbank settlement amount (amount of money returned).
The amount of the refund must be equal to the amount of the original SCT Inst minus the amount reported in the amount of expenses related to the transaction.

Object

Required

txInf.chrgBr

Charge bearer type.

Value: SLEV

String

Required

txInf.rtrRsnInf.rsn.cd

Code for the payment return.

The value must be FOCR when the return is for a previous Recall.

String

Required

txInf.orgnlTxRef

Data structure containing the transaction reference used to identify the original transaction

Object

Required

Example request body:

{
    "pmtRtr": {
        "grpHdr": {
            "msgId": "msgId-6186662747",
            "creDtTm": "2024-08-01T08:00:00.000+02:00",
            "nbOfTxs": "1",
            "sttlmInf": {
                "sttlmMtd": "CLRG"
            }
        },
        "txInf": [
            {
                "rtrId": "rtrId-6186662747",
                "rtrdIntrBkSttlmAmt": {
                    "value": 10.04,
                    "ccy": "EUR"
                },
                "intrBkSttlmDt": "2024-08-01",
                "chrgBr": "SLEV",
                "instgAgt": {
                    "finInstnId": {
                        "bicfi": "ABBYGB20XXX"
                    }
                },
                "instdAgt": {
                    "finInstnId": {
                        "bicfi": "BSCHESM0XXX"
                    }
                },
                "rtrRsnInf": [
                    {
                        "rsn": {
                            "cd": "FOCR"
                        },
                        "addtlInf": [
                            "raw-code",
                            "raw-description"
                        ]
                    }
                ],
                "orgnlTxRef": {
                    "pmtTpInf": {
                        "svcLvl": [
                            {
                                "prtry": "INST"
                            }
                        ],
                        "lclInstrm": {
                            "prtry": "TRF"
                        }
                    },
                    "dbtr": {
                        "pty": {
                            "nm": "Debtor",
                            "pstlAdr": {
                                "adrTp": {
                                    "cd": "ADDR"
                                },
                                "dept": "CL",
                                "strtNm": "NAME",
                                "bldgNm": "1",
                                "flr": "2",
                                "room": "I",
                                "pstCd": "28008",
                                "twnNm": "MADRID",
                                "twnLctnNm": "MADRID",
                                "ctrySubDvsn": "MADRID",
                                "ctry": "ES",
                                "adrLine": [
                                    "CL. NAME, 1 2 I",
                                    "28001 MADRID MADRID"
                                ]
                            },
                            "id": {
                                "prvtId": {
                                    "dtAndPlcOfBirth": {
                                "birthDt": "1993-05-19",
                                "prvcOfBirth": "MADRID",
                                "cityOfBirth": "MADRID",
                                "ctryOfBirth": "ES"
                            },
                                    "othr": [
                                        {
                                            "id": "F99999"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "dbtrAcct": {
                        "id": {
                            "othr": {
                                "id": "12345678"
                            }
                        }
                    },
                    "dbtrAgt": {
                        "finInstnId": {
                            "bicfi": "ABBYGB20",
                            "clrSysMmbId": {
                                "mmbId": "777241"
                            }
                        }
                    },
                    "cdtrAgt": {
                        "finInstnId": {
                            "bicfi": "BSCHPTM0XXX",
                            "pstlAdr": {
                                "adrTp": {
                                    "cd": "ADDR"
                                },
                                "dept": "CL",
                                "strtNm": "NAME",
                                "bldgNm": "1",
                                "flr": "1",
                                "room": "D",
                                "pstCd": "1000-004",
                                "twnNm": "Lisbon",
                                "twnLctnNm": "Lisbon",
                                "ctrySubDvsn": "Lisbon",
                                "ctry": "PT",
                                "adrLine": [
                                    "CL. NAME, 1 1 D",
                                    "1000-004 Lisbon Lisbon"
                                ]
                            }
                        }
                    },
                    "cdtrAcct": {
                        "id": {
                            "iban": "PT91BARC20032000945865"
                        },
                        "ccy": "EUR"
                    }
                }
            }
        ]
    }
}