Set up sweeping

Learn how to set up and update automated account sweeping, get details of sweep account transactions, and disable automatic account sweeping.

📘

What is sweeping?

Automatic payouts to business accounts on a regular basis when configured criteria are met.

The destination business account must have passed TrueLayer's KYC process.

By default, automated sweeping is not enabled, but you can make ad hoc payouts to your business account. To enable sweeping, you need to configure your preferences with TrueLayer's sweeping endpoints.

Sweeping is useful if you want to ensure that the account balance of your Merchant Accounts doesn't exceed a certain amount. For example, if you want to make sure your GBP Merchant Account never has a balance of over £10,000.

In order to set up sweeping, you need to:

  1. Complete the TrueLayer KYC process with an IBAN.
  2. Ask your Customer Success Manager or your Integration Manager to enable sweeping for your account.
  3. Use the sweeping endpoints to configure your preferences.

👍

What IBANs do we support?

To sweep from your GBP merchant account, the destination account details for sweeping must be a GB IBAN, an IBAN that starts with "GB".

To sweep from your EUR merchant account, the destination account details can be any IBAN that is connected to SEPA. You can check iban.com to know if the IBAN you'd like to sweep to is connected to SEPA.

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 pre-configured IBAN. The default time interval for automated sweeping is daily.

You can update your sweep configurations (such as frequency or max_amount_in_minor) by making an additional call with the updated values. We will use the latest value for a given currency.

FieldMandatoryTypeDescription
currencyMandatoryStringISO 4217 Currency Code of the account sweep source.
max_amount_in_minorMandatoryNumberThe desired maximum amount, specified in terms of the fractional monetary unit of the payment currency, above which funds will be automatically withdrawn.
frequencyOptionalStringHow often the available balance will be checked for sweeping. Possible values are daily, weekly or fortnightly. Defaults to daily.
curl -X POST \
  -H "Authorization: Bearer $access_token" \
  -H "TL-Signature: $signature" \
  --data '{
    "currency": "GBP",
    "max_amount_in_minor": 100000,
    "frequency": "daily"
  }' \
  https://api.truelayer.com/merchant-accounts/{id}/sweeping

Get automated account sweeping details

You can obtain all current automated sweeping configurations by making a GET call. If you haven't enabled automated sweeping, The response is a 404 error.

FieldTypeDescription
currencyStringISO 4217 Currency Code of the account sweep source.
max_amount_in_minorNumberThe desired maximum amount, specified in terms of the fractional monetary unit of the payment currency, above which funds will be automatically withdrawn.
ibanStringThe IBAN of the target account that funds will be withdrawn into. Pre-configured & validated as part of KYC onboarding.
frequencyStringHow often the available balance will be checked for sweeping. Possible values are daily, weekly or fortnightly.
curl -H "Authorization: Bearer $access_token" https://api.truelayer.com/merchant-accounts/{id}/sweeping

You get a response as below:

{
  "results": [
    {
      "currency": "GBP",
      "max_amount_in_minor": 100000,
      "iban": "GB43BUKB20201666666666",
      "frequency": "daily"
    }
  ]
}

Disable automated account sweeping

Disable automated sweeping for a given currency.

FieldMandatoryTypeDescription
currencyMandatoryStringISO 4217 Currency Code of the account sweep source.
curl -X DELETE \
  -H "Authorization: Bearer $access_token" \
  -H "TL-Signature: $signature" \
https://api.truelayer.com/merchant-accounts/{id}/sweeping

Did this page help you?