{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/SweepConfiguration",
"title": "SweepConfiguration",
"properties": {
"balanceAccountId": {
"description": "The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).\n\n You can only use this for periodic sweep schedules such as `schedule.type` **daily** or **monthly**.",
"type": "string"
},
"id": {
"description": "The unique identifier of the sweep.",
"type": "string"
},
"merchantAccount": {
"description": "The merchant account that will be the source of funds. You can only use this if you are processing payments with Adyen. This can only be used for sweeps of `type` **pull** and `schedule.type` **balance**.",
"type": "string"
},
"schedule": {
"description": "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.",
"oneOf": [
{
"$ref": "#/components/schemas/CronSweepSchedule"
},
{
"$ref": "#/components/schemas/SweepSchedule"
}
]
},
"status": {
"x-enum": [
{
"description": "The sweep is enabled and funds will be pulled in or pushed out based on the defined configuration",
"value": "active"
},
{
"description": "The sweep is disabled and cannot be triggered.",
"value": "inactive"
}
],
"description": "The status of the sweep. If not provided, by default, this is set to **active**.\n\nPossible values: \n\n * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. \n\n * **inactive**: the sweep is disabled and cannot be triggered. \n\n",
"enum": [
"active",
"inactive"
],
"type": "string"
},
"sweepAmount": {
"description": "The amount that must be pushed out or pulled in. You can configure either `sweepAmount` or `targetAmount`, not both.",
"$ref": "#/components/schemas/Amount"
},
"targetAmount": {
"description": "The amount that must be available in the balance account after the sweep. You can configure either `sweepAmount` or `targetAmount`, not both.",
"$ref": "#/components/schemas/Amount"
},
"transferInstrumentId": {
"description": "The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/transferInstruments__resParam_id).\n\nYou can also use this in combination with a `merchantAccount` and a `type` **pull** to start a direct debit request from the source transfer instrument. To use this feature, reach out to your Adyen contact.",
"type": "string"
},
"triggerAmount": {
"description": "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`.\n\n* For `type` **pull**, if the balance is less than or equal to the `triggerAmount`, funds are pulled in to the balance account.\n\n* For `type` **push**, if the balance is more than or equal to the `triggerAmount`, funds are pushed out of the balance account.",
"$ref": "#/components/schemas/Amount"
},
"type": {
"default": "push",
"description": "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**.\n\nPossible values:\n\n * **push**: _push out funds_ to a destination balance account or transfer instrument.\n\n * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account.",
"enum": [
"pull",
"push"
],
"type": "string"
}
},
"required": [
"id",
"schedule"
]
}