Automated account sweeping [PayDirect]
Learn how to set up and update automated account sweeping, get details of sweep account transactions, and disable automatic account sweeping.
Note
This feature is in private beta and is currently available to a limited number of clients. To join our private beta, contact Client Care.
You can set up automated sweeping to maintain a certain maximum balance in your accounts.
Automated sweeping is not enabled by default. Before setting it up, you must finish KYC onboarding. Also, note that we only support GBP sweeping. GBP sweeping must target a UK IBAN.
Set up or update account sweeping
You can set up automated sweeping for a given currency
. At regular intervals, any available balance in excess of the configured max_amount_in_minor
is withdrawn to a preconfigured IBAN. The default time interval for automated sweeping is daily
.
Update your sweeping configurations (such as changing the frequency
or max_amount_in_minor
) by making a POST /v1/sweep
call with the updated values. We will use the latest value for a given currency.
Field | Mandatory | Type | Description |
---|---|---|---|
currency | Mandatory | string | ISO 4217 Currency Code of the account sweep source. |
max_amount_in_minor | Mandatory | number | The desired maximum amount, specified in terms of the smallest denomination of the payment currency. Above this amount, money will be automatically withdrawn. |
frequency | Optional | string | How often the available balance will be checked for sweeping: daily , weekly or fortnightly . Defaults to daily . |
curl -X POST \
-H "Authorization: Bearer $access_token" \
-H "X-TL-Signature: $signature" \
--data '{
"currency": "GBP",
"max_amount_in_minor": 100000,
"frequency": "daily"
}' \
https://paydirect.truelayer-sandbox.com/v1/sweep
Get automated account sweeping details
You can get all current automated sweeping configurations by making a GET /v1/sweep
call.
Field | Type | Description |
---|---|---|
currency | ISO 4217 Currency Code String | Currency of the account sweep source. |
max_amount_in_minor | number | The desired maximum amount, specified in terms of the smallest denomination of the payment currency. Above this amount, money will be automatically withdrawn. |
iban | string | The IBAN of the target account that funds will be withdrawn into. This is pre-configured & validated as part of KYC onboarding. |
frequency | string | How often the available balance will be checked for sweeping. |
curl -H "Authorization: Bearer $access_token" https://paydirect.truelayer-sandbox.com/v1/sweep
If you haven't enabled automated sweeping, you'll get a 404
error.
If automated sweeping is enabled, you'll get a response like this:
{
"results": [
{
"currency": "GBP",
"max_amount_in_minor": 100000,
"iban": "GB43BUKB20201666666666",
"frequency": "daily"
}
]
}
Disable automated account sweeping
Disable automated sweeping for a given currency
.
Field | Mandatory | Type | Description |
---|---|---|---|
currency | Mandatory | ISO 4217 Currency Code String | Currency of the account sweep source |
curl -X POST \
-H "Authorization: Bearer $access_token" \
-H "X-TL-Signature: $signature" \
--data '{"currency": "GBP"}' \
https://paydirect.truelayer-sandbox.com/v1/sweep/remove
Updated 7 months ago