Update a sweep

patch /balanceAccounts/{balanceAccountId}/sweeps/{sweepId}

Updates a sweep. When updating a sweep resource, note that if a request parameter is not provided, the parameter is left unchanged.

Endpoint destination URL

https://balanceplatform-api-test.adyen.com/bcl/v2/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}
Click to copy

Path parameters

sweepId string Required

The unique identifier of the sweep.

balanceAccountId string Required

The unique identifier of the balance account.

Request parameters

counterparty Required

The destination or the source of the funds, depending on the type.

Either a balanceAccountId, transferInstrumentId, or merchantAccount is required.

currency string Required

The three-character ISO currency code in uppercase. For example, EUR.

The sweep currency must match any of the balances currencies.

description string

The message that will be used in the sweep transfer's description body with a maximum length of 140 characters.

If the message is longer after replacing placeholders, the message will be cut off at 140 characters.

id string Required

The unique identifier of the sweep.

schedule Required

The schedule when the triggerAmount is evaluated. If the balance meets the threshold, funds are pushed out of or pulled in to the balance account.

status string

The status of the sweep. If not provided, by default, this is set to active.

Possible values:

  • active: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration.

  • inactive: the sweep is disabled and cannot be triggered.

sweepAmount

The amount that must be pushed out or pulled in. You can configure either sweepAmount or targetAmount, not both.

targetAmount

The amount that must be available in the balance account after the sweep. You can configure either sweepAmount or targetAmount, not both.

triggerAmount

The threshold amount that triggers the sweep. If not provided, by default, the amount is set to zero. The triggerAmount is evaluated according to the specified schedule.type.

  • For type pull, if the balance is less than or equal to the triggerAmount, funds are pulled in to the balance account.

  • For type push, if the balance is more than or equal to the triggerAmount, funds are pushed out of the balance account.

type string

The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to push.

Possible values:

  • push: push out funds to a destination balance account or transfer instrument.

  • pull: pull in funds from a source merchant account, transfer instrument, or balance account.

Response parameters

After submitting a call, you receive a response message to inform you that your request was received and processed.

Depending on the HTTP status code of the response message, it is helpful to build some logic to handle any errors that a request or the system may return.

HTTP Responses

  • 200 - OK

    The request has succeeded.

    Show more Show less
  • 400 - Bad Request

    A problem reading or understanding the request.

    Show more Show less
  • 401 - Unauthorized

    Authentication required.

    Show more Show less
  • 403 - Forbidden

    Insufficient permissions to process the request.

    Show more Show less
  • 422 - Unprocessable Entity

    A request validation error.

    Show more Show less
  • 500 - Internal Server Error

    The server could not process the request.

    Show more Show less
  • Request
  • Click to copy
  • Response
  • Click to copy