{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/adyen/refs/heads/main/json-schema/configuration-webhooks-sweep-configuration-v2-schema.json", "title": "SweepConfigurationV2", "description": "SweepConfigurationV2 schema from Adyen API", "type": "object", "properties": { "counterparty": { "description": "The destination or the source of the funds, depending on the sweep `type`.\n\nEither a `balanceAccountId`, `transferInstrumentId`, or `merchantAccount` is required.", "$ref": "#/components/schemas/SweepCounterparty" }, "currency": { "description": "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**.\n\nThe sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances).", "type": "string" }, "description": { "description": "The message that will be used in the sweep transfer's description body with a maximum length of 140 characters.\n\nIf the message is longer after replacing placeholders, the message will be cut off at 140 characters.", "type": "string" }, "id": { "description": "The unique identifier of the sweep.", "type": "string" }, "reason": { "description": "The reason for disabling the sweep.", "enum": [ "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declinedByTransactionRule", "error", "notEnoughBalance", "refusedByCounterpartyBank", "routeNotFound", "scaFailed", "unknown" ], "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.", "$ref": "#/components/schemas/SweepSchedule" }, "status": { "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" }, "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", "currency", "counterparty" ] }