You can specify a unique string as part of the beneficiary_reference
API field. You can then query the beneficiary account using the Data API to locate the deposit transaction which includes this string. For this reason, we recommend that thebeneficiary_reference
field is unique to each payment.
Example
Initiate a payment like the below
curl -X POST \
-H "Authorization: Bearer ${access_token}" \
--data '{
"amount": 120000,
"currency": "GBP",
"remitter_provider_id": "ob-bank",
"remitter_name": "Mike Smith",
"remitter_sort_code": "987654",
"remitter_account_number": "98765432",
"remitter_reference": "FS-1000001",
"beneficiary_name": "Financial Services Ltd",
"beneficiary_sort_code": "234567",
"beneficiary_account_number": "23456789"
"beneficiary_reference": "FinServ-1a2b3c4d",
"redirect_uri": "https://client.app.com/payment_redirect"
}' \
https://pay-api.truelayer.com/single-immediate-payments
Then, using the Data API, query /transactions and look for a transaction with the reference above:
"results": [
{
"transaction_id": "03c333979b729315545816aaa365c33f",
"timestamp": "2020-03-06T00:00:00",
"description": "FinServ-1a2b3c4d",
"amount": -1200.00,
"currency": "GBP",
"transaction_type": "DEBIT",
"transaction_category": "TRANSFER",
"transaction_classification": [
"Transfer"
],
"merchant_name": "Financial Services Ltd",
"running_balance": {
"amount": 1238.60,
"currency": "GBP"
},
"meta": {
"bank_transaction_id": "9882ks-00js",
"provider_transaction_category": "DEB"
}
}
More
Note that when a payment initiation is completed, it is very likely that it will be settled; however, there is a very small possibility of a bank system error resulting in failure or reversal of the payment. In the UK, this is governed by the rules of the Faster Payments system.
Note that if the payment failed, you will not find a corresponding deposit in the beneficiary account you specified. You will be able to identify failed payments by using the GET method on the related payment resource and checking the status field. If the status is new, cancelled, or rejected, the payment will not have been processed.