PayDirect to Payments v3 API: merchant account requests
Track transactions to and from your merchant account, and set up sweeping.
A merchant account is a bank account managed by TrueLayer on your behalf. The merchant account sits in the middle of the payments journey and enables the following flow of funds:
- Payments from the end user's bank account to your merchant account (pay-ins)
- Payments from your merchant account to the end user's bank account (payouts)
- Payments from your corporate business account to your merchant account
- Sweeping payments from your merchant account to your corporate business account
Find the details of this account in the TrueLayer Console, including:
- the merchant account holder name
- the account number
- the sort code
- the IBAN
All payments coming into and out of this account are recorded in the Console, except payments on a mandate.
With the PayDirect API, you could retrieve balances and transactions via API call. See below for how to migrate those calls to Payments V3 and set up sweeping variable recurring payments.
Get /balances
/balances
PayDirect endpoint | Payments v3 endpoint |
---|---|
https://paydirect.truelayer.com/v1/balances | https://api.truelayer.com/merchant-accounts |
The v3 response includes more information than the PayDirect response, including the sort_code
and account_number
(for UK currency) and the merchant account id
. This id
identifies the merchant account that pay-ins are made into, or payouts are sent from.
{
"items":
[
{
"id": "68e11e56-1062-4529-8cc7-e5c291948db7",
"currency": "GBP",
"account_identifiers":
[
{
"type": "sort_code_account_number",
"sort_code": "040668",
"account_number": "00001719"
},
{
"type": "iban",
"iban": "GB71CLRB04066800001719"
}
],
"available_balance_in_minor": 4039,
"current_balance_in_minor": 4039,
"account_holder_name": "Federico Casali"
},
{
"id": "dc75c4c0-85c9-489d-8394-09854f651d4e",
"currency": "EUR",
"account_identifiers":
[
{
"type": "iban",
"iban": "GB21CLRB04066800002328"
}
],
"available_balance_in_minor": 9835,
"current_balance_in_minor": 9835,
"account_holder_name": "Federico Casali"
}
]
}
Get /transactions
/transactions
PayDirect endpoint | Payments v3 endpoint |
---|---|
https://paydirect.truelayer.com/v1/balances | https://api.truelayer.com/merchant-accounts/{id}/transactions |
Set up sweeping
To set up or change automated sweeping settings, you need to use a different endpoint. You must also pass your merchant account id
as part of the endpoint URI.
PayDirect endpoint | Payments v3 endpoint |
---|---|
https://paydirect.truelayer.com/v1/sweep | https://api.truelayer.com/merchant-accounts/<merchant_account_ID>/sweeping |
There are no changes to the API request body.
Updated 7 months ago