Merchant account sweeping

Learn how to automate withdrawals and ensure the funds in your merchant account don't exceed a certain value.

Sweeping refers to automatic payments to your business account based on criteria you choose, such as maximum account balance and frequency.

📘

Sweeping in Console

You can set up sweeping in Console in the Merchant Account Sweeping tab under your merchant accounts. This method uses a user interface and doesn't need API requests. Learn more.

By default, automated sweeping isn't 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 can be 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 (these IBANs start 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 each 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 use the latest values you've submitted for each currency.

FieldMandatoryTypeDescription
currencyMandatoryStringISO 4217 Currency Code of the account sweep source.
max_amount_in_minorMandatoryNumberThe maximum amount, above which funds will be automatically withdrawn.

Specified in terms of the fractional monetary unit of the payment currency. For example, 100 is equal to 1 GBP or 1 EUR.
frequencyOptionalStringHow often the available balance is checked for sweeping.

The possible values are daily, weekly or fortnightly. If omitted, defaults to daily.

Funds are always swept at 10:00 UTC on a Monday if you select Weekly or Fortnightly.

This is an example of a request to the /v3/merchant-accounts/{merchant-account_id/sweeping} endpoint

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/v3/merchant-accounts/{id}/sweeping

References

On bank statements, payments made with merchant account sweeping indicate the date and time that they were made.

References display in the format TL YY-MM-DD HH:MM.

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 endpoint returns a 404 error.

FieldTypeDescription
currencyStringISO 4217 Currency Code of the account sweep source.
max_amount_in_minorNumberThe maximum amount, above which funds will be automatically withdrawn.

Specified in terms of the fractional monetary unit of the payment currency. For example, 100 is equal to 1 GBP or 1 EUR.
ibanStringThe IBAN of the target account that funds will be withdrawn into. This is pre-configured & validated as part of KYC onboarding.
frequencyStringHow often the available balance is checked for sweeping.

The possible values are daily, weekly or fortnightly.
curl -H "Authorization: Bearer $access_token" https://api.truelayer.com/v3/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/v3/merchant-accounts/{id}/sweeping