Making payments with Faster Payments (pain001)
This tutorial describes how you can make Faster Payments (FP) payments with the Payments Hub API.
For this tutorial, consider a scenario where a customer wants to make multiple similar payments to several beneficiaries, for example, a payroll wanting to make their payroll payments. The customer is sending money from their UK or overseas bank account to a UK bank account. If the customer has enough funds in their account, the Payments Hub API can be used to transfer the money to the other account. This tutorial describes how you can first submit the FP payment using the ISO pain.001 message.
Sandbox
These instructions apply to the Sandbox environment only
Request body
The request must include a JSON payload object in the request body. The JSON payload is a pain.001 ISO message with the cstmrCdtTrfInitn root element, and it contains the request details for submitting 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 pain.001.
Table: Submit the payment - Relevant request body elements.
Message field | Description | Data type | Required/ Optional |
|---|---|---|---|
grpHdr.nbOfTxs | Number of transactions within the message. Value: 1 | String | Required |
grpHdr.initgPty.nm | Name of the payment initiating party (debtor or a party acting on behalf of the debtor) | String | 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 request | String | Required |
pmtInf.pmtInfId | Unique identification of the payment information group within the request | String | Required |
pmtInf.pmtMtd | Payment method to be used. The value is TRF. | String | Required |
pmtInf.btchBookg | Whether a single entry per individual transaction or a batch entry for the sum of the amounts of all transactions within the group is requested. The value is false. | Boolean | Optional |
pmtInf.reqdExctnDt | Date when the initiating party wants the clearing agent to process the payment | String | Required |
pmtInf.pmtTpInf.svcLvl.prtry | Proprietary service level. The value is FP. | String | Required |
pmtInf .dbtr .dbtrAcct .dbtrAgt | Data structures containing the details for the debtor, the debtor’s account, and the debtor agent. You must define either the name or the postal address for the debtor (for overseas payments, the postal address is required). | Object | Required |
pmtInf.cdtTrfTxInf.pmtId.endToEndId | End-to-end ID, which can be used to track the transaction between payment systems. | String | Required |
pmtInf.cdtTrfTxInf.pmtTpInf.lclInstrm.prtry | Faster Payments Scheme (FPS) processing code. The possible values are:
| String | Required |
pmtInf.cdtTrfTxInf.amt | Data structure containing the amount of money to be moved between the debtor and creditor, before deduction of charges, expressed in the currency as ordered by the initiating party. The currency must be GBP and the amount must be a positive value. | Object | Required |
pmtInf.cdtTrfTxInf .cdtr .cdtrAcct .cdtrAgt | Data structures containing the details for the creditor, the creditor’s account, and the creditor agent. The creditor postal address is required for overseas payments. | Object | Required |
pmtInf.cdtTrfTxInf.rmtInf | Data structure containing remittance details, either in unstructured or structured form | Object | Optional |
pmtInf.cdtTrfTxInf.splmtryData | Additional information that cannot be captured in the structured elements and/or any other
| Object | Opcional |
Example request body:
{
"cstmrCdtTrfInitn": {
"grpHdr": {
"nbOfTxs": "1",
"initgPty": {
"nm": "CROSSFITXP"
},
"msgId": "SGP01234567890123",
"creDtTm": "2024-03-08T18:04:25.000Z"
},
"pmtInf": [
{
"pmtInfId": "SGP01234567890123",
"pmtMtd": "TRF",
"btchBookg": false,
"reqdExctnDt": {
"dt": "2024-03-08"
},
"pmtTpInf": {
"svcLvl": [
{
"prtry": "FP"
}
]
},
"dbtr": {
"nm": "CROSSFIT EXPERIENCE (UK) LIMITED",
"pstlAdr": {
"ctry": "GB"
}
},
"dbtrAcct": {
"id": {
"othr": {
"id": "12345678"
}
}
},
"dbtrAgt": {
"finInstnId": {
"clrSysMmbId": {
"mmbId": "012345"
}
}
},
"cdtTrfTxInf": [
{
"pmtId": {
"endToEndId": "Sarah Connor"
},
"pmtTpInf": {
"lclInstrm": {
"prtry": "10"
}
},
"amt": {
"instdAmt": {
"ccy": "GBP",
"value": 1500
}
},
"cdtr": {
"nm": "John Doe",
"pstlAdr": {
"ctry": "GB"
}
},
"cdtrAcct": {
"id": {
"othr": {
"id": "01234567"
}
}
},
"cdtrAgt": {
"finInstnId": {
"clrSysMmbId": {
"mmbId": "012345"
},
"pstlAdr": {
"ctry": "GB"
}
}
},
"rmtInf": {
"strd": [
{
"cdtrRefInf": {
"ref": "CROSSFIT PAYROLL"
}
}
],
"ustrd": [
"CROSSFIT PAYROLL"
]
}
}
]
}
]
}
}