Making overseas payments with Faster Payments (pacs.008 and pacs.002)
  • 08 Apr 2024
  • 9 Minutes to read
  • Dark
    Light

Making overseas payments with Faster Payments (pacs.008 and pacs.002)

  • Dark
    Light

Article Summary

This tutorial describes how you can make Faster Payments Originated Overseas (POO) using the Payments Hub API.

For this tutorial, consider a scenario where a customer wants to make an overseas Faster Payments (FP) payment - send money from their bank account somewhere in the world to a UK bank account, as quickly as possible. This tutorial describes, in 2 separate sections, how you can first submit the overseas FP payment using the ISO pacs.008 message and then receive a notification whenever the payment status changes, allowing you to retrieve its status using the ISO pacs.002 message.

Note

The instructions in this tutorial apply to the sandbox environment.

Prerequisites

Before obtaining the access token, make sure you have a public-private key pair that you can use to sign JWT Bearer tokens.

Click here to email your public key, along with the kid and iss claim values you will use in your JWT Bearer tokens.

Note

  • The public key must be created with RSA and sent in PEM format, without password encryption, and must have a length of at least 2048 bits. If these criteria are not met, the token will be rejected.

  • If you don't have a public-private key pair yet, you can use a predefined JWT Bearer token in the sandbox with no need to create or sign your own tokens for authentication:

    eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6InByb1BheW1lbnRzSHViU2IifQ.eyJzdWIiOiJxTWtaOTBxb0hBTjVJbkE2V2xNYVZBaE41dDhBQWVPeCIsImlzcyI6IlNhbnRhbmRlciIsImlhdCI6MTcxMDg0MjgwNCwibmJmIjoxNzEwODQyODA0LCJleHAiOjE3NDIzNzg4MDQsImp0aSI6ImM3YWY0Yzg0LTRkYzQtNDM2Mi05OTA2LWM5ZTg5N2YyNzUzOCJ9.LOaGmVUnQ6I0HYUQWA1y2vUhREaJrAasAxDlqAnxKbEYGmjP6AKeIViLdkBVVPTUWRETxmnlU6fBQRYU0BN8NEJ9dd_uJ20uiPGWp1ieTFvee27LbqqqS-4AbwD_oJluBUzb77cx4P_1o35gFskcFjbzdl5ert4xJvpbXNOQYa0C7f4YQ6wMLjCGkbdhimwRxeOEGVdYiRoVEizkPpNgUZi_H3o58gATIJ4rSSWqLmKvy9aBlK_YAT947klkJI-ej22KU8qgLCInBbBGdoW9gjg8Zpmizs7Xc7eAvNm7QRiAzd1NT6dgX3hAYDJz2m2dnZYS6zE_UPWOi5cbAyQggw
  • In the sandbox environment, you can use a predefined test SCA JWT Bearer token:

    eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6InByb1BheW1lbnRzSHViU2IifQ.eyJoZCI6ImhzcU5uRUtsZ1IrUHFlZnJnK2dpaDBQRGVOcWl6R3d1UTFzTXd6akZPRGs9Iiwibm9uY2UiOiJhOGExZTkyMzkwZDUxZTc5M2FhYiIsImFsZyI6IlNIQTI1NiIsImlhdCI6MTcxMjMxMjE2MCwibmJmIjoxNzEyMzEyMTYwLCJleHAiOjE3NDM4NDgxNjAsImp0aSI6IjBjYjBjM2MwLTk2YWQtNDQ5OC1iMTMzLTM1ODUwYjE2ZDRmMSJ9.O-GdpD8zuI3-ZHUZhAgnVyDPnZYYUo3hn_xjD2o7NiO2oXrfU3_NZasAb1sMq9WaU49olbA_7F-_LQ7pAJ-K4hT_CvpCVvHlrcaXodc1NOacliNAs6dVvw-C1l6K0eqtILSrx47tDTwoA1kei9S6YVY06r5euAmZ3P1F7_SgHwVofJLlv9DeN-J3DGuecIgSAOYKad16QPv4x-dk_qulgTjtw_-BT8g5D4wyaC5y7siWyi_dDgJ66aSruVhaU0x2XuxPX8lfbg4Ojlhn6tTYim7CbgLKReBy4295vWrmPkTSie5B9bw8u3pSpA91_mjv0EXYShUJ3sJkeH5MV-Pcpw

1. Authenticate to get an access token

The Payments Hub API endpoints are protected with OAUTH 2.0 JWT Bearer grant. To use the API, you must create a JWT Bearer token and use it to get an access token:

2. Submit the payment

This section describes how to submit a payment via a pacs.008 HTTP request to the Payments Hub API. It also illustrates a successful response.

Request

Create and send a request using the following operation:

POST https://sandbox.apis.santander.com/payments/pacs008/v08

Headers

The request must contain the headers shown in the following table.

Table: Submit the payment - Required request headers

Header name

Description

Required/Optional

Values

Authorization

Authorization security header

Required

Bearer <Access token>

X-Santander-Client-Id

Client ID

Required

<Client ID>

Content-Type

Format of the request body

Required

application/json

sca-token

SCA JWT bearer token:

  • In the sandbox environment, you can use a predefined test SCA JWT Bearer token (see the Prerequisites section).

  • In the live environment, you must create the token based on the message body (whose details are described below) and sign it with your private key. For more information on the token details, see the Appendix in Authentication guide.

Required

<SCA token>

Required

application/json

Request body

The request must include a JSON payload object in the request body. The JSON payload is a pacs.008 ISO message with the fitoFICstmrCdtTrf 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 pacs.008.

Table: Submit the payment - Relevant request body elements

Message field

Description

Data type

Required/Optional

grpHdr.msgId

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

This ID is used internally for idempotency of the API.

The value must consist of letters and digits only.

String

Required

grpHdr.creDtTm

Date and time of the payment request

String

Required

grpHdr.nbOfTxs

Number of transactions within the message.

Value: 1

Number

Required

grpHdr.ttlIntrBkSttlmAmt

Data structure containing the payment currency and the amount for the total interbank settlement.

The currency must be GBP and the amount must be a positive value.

If these fields are used, the amount must be equal to the sum of all the transactions in the message.

Object

Optional

grpHdr.sttlmInf.sttlmMtd

Settlement method.

Value: CLRG

String

Required

cdtTrfTxInf.pmtId.endToEndId

End-to-end ID, which can be used to track the transaction between payment systems

String

Required

cdtTrfTxInf.pmtId.txId

Transaction ID, which must uniquely identify each transaction within the message

String

Required

cdtTrfTxInf.pmtTpInf.svcLvl.prtry

Payment scheme type.

Value: FP

String

Optional

cdtTrfTxInf.pmtTpInf.lclInstrm.prtry

Faster Payments Scheme (FPS) processing code

String

Required

cdtTrfTxInf.pmtTpInf.ctgyPurp.prtry

Payment channel

String

Optional

cdtTrfTxInf.intrBkSttlmAmt

Data structure containing the payment currency and the amount to be transferred.

The currency must be GBP  and the amount must be a positive value.

Object

Required

cdtTrfTxInf.chrgBr

Charge bearer type.

The possible values are:

  • SLEV = Charges are applied according to the rules agreed in the service level and/or scheme

  • SHAR = Charges on the sender side are borne by the debtor, and charges on the receiver side are borne by the creditor

String

Required

cdtTrfTxInf

► . intrmyAgt1

► . intrmyAgt1Acct

Data structures containing the details for the intermediary agent and the agent's account.

These structures are required if you use multiple agencies and agency accounts for debiting.

Object

Optional

cdtTrfTxInf

►  .dbtr

►  .dbtrAcct

►  .dbtrAgt

Data structures containing the details for the debtor, the debtor’s account, and the debtor agent

Object

Required

cdtTrfTxInf

►  .cdtrAgt

►  .cdtr

►  .cdtrAcct

Data structures containing the details for the creditor agent, the creditor, and the creditor’s account

Object

Required

cdtTrfTxInf.rgltryRptg

List of regulatory reporting data

Array

Optional

cdtTrfTxInf.rmtInf

Data structure containing remittance details

Object

Optional

Example request body:

{
    "fitoFICstmrCdtTrf": {
        "grpHdr": {
            "msgId": "MsgId-4334558394999123",
            "creDtTm": "2022-02-03T11:08:19.664+01:00",
            "nbOfTxs": "1",
            "sttlmInf": {
                "sttlmMtd": "CLRG"
            }
        },
        "cdtTrfTxInf": [
            {
                "pmtId": {
                    "endToEndId": "e2eId-1587641040",
                    "txId": "111112"
                },
                "pmtTpInf": {
                    "svcLvl": [
                        {
                            "prtry": "FP"
                        }
                    ],
                    "lclInstrm": {
                        "prtry": "TRF"
                    }
                },
                "intrBkSttlmAmt": {
                    "value": 10.04,
                    "ccy": "GBP"
                },
                "xchgRate": 0.10,
                "chrgBr": "SHAR",
                "dbtr": {
                    "nm": "Debtor",
                    "pstlAdr": {
                        "twnNm": "amsterdam",
                        "ctry": "NL",
                        "adrLine": [
                            "Somewhere in Netherlands"
                        ]
                    }
                },
                "dbtrAcct": {
                    "id": {
                        "othr": {
                            "id": "12345678"
                        }
                    }
                },
                "dbtrAgt": {
                    "finInstnId": {
                        "bicfi": "BSCHESMMXXX",
                        "pstlAdr": {
                            "twnNm": "amsterdam",
                            "ctry": "NL",
                            "adrLine": [
                                "Somewhere in Netherlands"
                            ]
                        }
                    }
                },
                "cdtrAgt": {
                    "finInstnId": {
                        "bicfi": "ABBYGB3E",
                        "clrSysMmbId": {
                            "mmbId": "090401"
                        },
                        "pstlAdr": {
                            "twnNm": "miltonKeynes",
                            "ctry": "GB",
                            "adrLine": [
                                "Somewhere in MK"
                            ]
                        }
                    }
                },
                "cdtr": {
                    "nm": "Creditor",
                    "pstlAdr": {
                        "twnNm": "miltonKeynes",
                        "ctry": "GB",
                        "adrLine": [
                            "Somewhere in MK"
                        ]
                    }
                },
                "cdtrAcct": {
                    "id": {
                        "iban": "GB91BARC09023134945865"
                    }
                },
                "rmtInf": {
                    "strd": [
                        {
                            "cdtrRefInf": {
                                "ref": "validref123"
                            }
                        }
                    ]
                }
            }
        ]
    }
}

Request example

The following example illustrates the request using raw HTTP code:

POST /payments/pacs008/v08 HTTP/1.1
Host: sandbox.apis.santander.com
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
X-Santander-Client-Id: YOUR_CLIENT_ID
sca-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6InByb1BheW1lbnRzSHViU2IifQ.eyJoZCI6ImhzcU5uRUtsZ1IrUHFlZnJnK2dpaDBQRGVOcWl6R3d1UTFzTXd6akZPRGs9Iiwibm9uY2UiOiJhOGExZTkyMzkwZDUxZTc5M2FhYiIsImFsZyI6IlNIQTI1NiIsImlhdCI6MTcxMjMxMjE2MCwibmJmIjoxNzEyMzEyMTYwLCJleHAiOjE3NDM4NDgxNjAsImp0aSI6IjBjYjBjM2MwLTk2YWQtNDQ5OC1iMTMzLTM1ODUwYjE2ZDRmMSJ9.O-GdpD8zuI3-ZHUZhAgnVyDPnZYYUo3hn_xjD2o7NiO2oXrfU3_NZasAb1sMq9WaU49olbA_7F-_LQ7pAJ-K4hT_CvpCVvHlrcaXodc1NOacliNAs6dVvw-C1l6K0eqtILSrx47tDTwoA1kei9S6YVY06r5euAmZ3P1F7_SgHwVofJLlv9DeN-J3DGuecIgSAOYKad16QPv4x-dk_qulgTjtw_-BT8g5D4wyaC5y7siWyi_dDgJ66aSruVhaU0x2XuxPX8lfbg4Ojlhn6tTYim7CbgLKReBy4295vWrmPkTSie5B9bw8u3pSpA91_mjv0EXYShUJ3sJkeH5MV-Pcpw
Content-Length: 3251

{
    "fitoFICstmrCdtTrf": {
        "grpHdr": {
            "msgId": "MsgId-4334558394999123",
            "creDtTm": "2022-02-03T11:08:19.664+01:00",
            "nbOfTxs": "1",
            "sttlmInf": {
                "sttlmMtd": "CLRG"
            }
        },
        "cdtTrfTxInf": [
            {
                "pmtId": {
                    "endToEndId": "e2eId-1587641040",
                    "txId": "111112"
                },
                "pmtTpInf": {
                    "svcLvl": [
                        {
                            "prtry": "FP"
                        }
                    ],
                    "lclInstrm": {
                        "prtry": "TRF"
                    }
                },
                "intrBkSttlmAmt": {
                    "value": 10.04,
                    "ccy": "GBP"
                },
                "xchgRate": 0.10,
                "chrgBr": "SHAR",
                "dbtr": {
                    "nm": "Debtor",
                    "pstlAdr": {
                        "twnNm": "amsterdam",
                        "ctry": "NL",
                        "adrLine": [
                            "Somewhere in Netherlands"
                        ]
                    }
                },
                "dbtrAcct": {
                    "id": {
                        "othr": {
                            "id": "12345678"
                        }
                    }
                },
                "dbtrAgt": {
                    "finInstnId": {
                        "bicfi": "BSCHESMMXXX",
                        "pstlAdr": {
                            "twnNm": "amsterdam",
                            "ctry": "NL",
                            "adrLine": [
                                "Somewhere in Netherlands"
                            ]
                        }
                    }
                },
                "cdtrAgt": {
                    "finInstnId": {
                        "bicfi": "ABBYGB3E",
                        "clrSysMmbId": {
                            "mmbId": "090401"
                        },
                        "pstlAdr": {
                            "twnNm": "miltonKeynes",
                            "ctry": "GB",
                            "adrLine": [
                                "Somewhere in MK"
                            ]
                        }
                    }
                },
                "cdtr": {
                    "nm": "Creditor",
                    "pstlAdr": {
                        "twnNm": "miltonKeynes",
                        "ctry": "GB",
                        "adrLine": [
                            "Somewhere in MK"
                        ]
                    }
                },
                "cdtrAcct": {
                    "id": {
                        "iban": "GB91BARC09023134945865"
                    }
                },
                "rmtInf": {
                    "strd": [
                        {
                            "cdtrRefInf": {
                                "ref": "validref123"
                            }
                        }
                    ]
                }
            }
        ]
    }
}

Response

If the request is valid, you receive an HTTP 201 Created response, which means that the payment was successfully submitted. In addition, the response body returns the data JSON object, which contains details of the submitted payment. If the request is submitted again with the same message ID, you receive an HTTP 200 OK response. For further details of HTTP response codes and instructions on how to handle errors, see HTTP codes and request error handling .

The following table shows the response body elements that are relevant for the current use case. For details on all the response body elements, see Message field definition for pacs.008 .

Extract the value of the paymentsHubId key, as you'll need it in the next section.

Table: Submit the payment - Relevant response body elements

Element

Description

Data type

paymentsHubId

Payments Hub ID, which uniquely identifies your payment request in Payments Hub. You can use it to verify the status of the requested payment.

String

paymentsId

Message ID you defined in the request as the grpHdr.msgId field value

String

status

Current status of the payment. Since Payments Hub stores all requests for a while before performing the transaction settlement, this value is returned as PENDING.

String

Example response body:

{
    "data": {
        "paymentsHubId": "a2070a9e-963a-36eb-af9e-32168f04f3b8",
        "paymentId": "MsgId-4334558394999123",
        "status": "PENDING",
        "creationDateTime": "2022-04-21T07:33:56.617989"
    }
}

3. Check the payment status

This section describes how to check the payment status after submitting a payment, via a pacs.002 HTTP request to the Payments Hub API. To send this request, you need to provide the Payments Hub ID that you received in the response to the pacs.008 request sent in the previous section, or that was provided in the notification. For information, see Notifications . This section also illustrates a successful response.

Note

Notifications are not used in the sandbox environment.

Request

Create and send a request using the following operation:

GET https://sandbox.apis.santander.com/payments/pacs002/v10/{paymentsHubId}

Headers

The request must contain the headers shown in the following table.

Table: Check the payment status - Required request headers

Header name

Description

Required/Optional

Values

Authorization

Authorization security header

Required

Bearer <Access token>

X-Santander-Client-Id

Client ID

Required

<Client ID>

Accept

Format of the response body

Required

application/json

Parameters

The request must contain the path parameters shown in the following table.

Table: Check the payment status - Request parameters

Parameter type

Parameter name

Description

Data format

Required/Optional

Path

paymentsHubId

Payments Hub ID related to the payment whose status you want. This is the value you received in the response to your payment request.

String

Required

Request example

The following example illustrates the request using raw HTTP code:

GET /payments/pacs002/v10/YOUR_PAYMENTS_HUB_ID HTTP/1.1
Host: sandbox.apis.santander.com
Authorization: Bearer YOUR_ACCESS_TOKEN
X-Santander-Client-Id: YOUR_CLIENT_ID

Response

If the request is valid, you receive an HTTP 200 OK response, which means that the payment status was successfully retrieved. For further details of HTTP response codes and instructions on how to handle errors, see HTTP codes and request error handling. In addition to the response code, the response body returns the fitoFIPmtStsRpt JSON object, which contains a pacs.002 ISO message.

The following table shows the response body elements that are relevant for the current use case. For details on all the response body elements, see Message field definition for pacs.002.

Extract the value of the txInfAndSts.txSts key to see the current status of the payment.

Table: Check the payment status - Relevant response body elements

Element

Description

Data type

paymentsHubId

Payments Hub ID, which uniquely identifies your payment request in Payments Hub. You can use it to verify the status of the requested payment.

String

paymentsId

Message ID you defined in the request as the grpHdr.msgId field value

String

status

Current status of the payment. Since Payments Hub stores all requests for a while before performing the transaction settlement, this value is returned as PENDING.

String

The possible status values are based on the ISO standard. For example: ACCC (accepted) or RJTC (rejected)

For more information on the status and the related codes that provide the reason for the payment acceptance or rejection, see Payment status and codes .|String|

Example response body:

{
    "fitoFIPmtStsRpt": {
        "grpHdr": {
            "msgId": "25a28082e2ae44848f7e32575e0fc5ba",
            "creDtTm": "2022-04-21T07:33:56.729Z"
        },
        "txInfAndSts": [
            {
                "orgnlGrpInf": {
                    "orgnlMsgId": "MsgId-4334558394999123",
                    "orgnlMsgNmId": "pacs.008.001.08"
                },
                "orgnlEndToEndId": "e2eId-1587641040",
                "orgnlTxId": "111112",
                "txSts": "ACCC",
                "stsRsnInf": [
                    {
                        "addtlInf": [
                            null,
                            null,
                            "FPID:111112",
                            null
                        ]
                    }
                ],
                "orgnlTxRef": {
                    "pmtTpInf": {
                        "svcLvl": [
                            {
                                "prtry": "FP"
                            }
                        ]
                    },
                    "rmtInf": {
                        "strd": [
                            {
                                "addtlRmtInf": [
                                    "111112"
                                ]
                            }
                        ]
                    }
                }
            }
        ]
    }
}

ISO20022 API Specification

Check API Documentation

Click below to embark on your journey to new possibilities.

Download Swagger File

Take the next step towards enhanced efficiency and performance.


Was this article helpful?