You can view, update, and delete your balance webhook settings by using the Configuration API.
View all balance webhook settings
To get the list of settings and conditions for triggering the webhook, make a GET /balancePlatforms/{id}/webhooks/{id}/settings request, specifying the ID of your balance platform and the ID of your balance webhook as path parameters.
curl https://balanceplatform-api-test.adyen.com/balancePlatforms/YourBalancePlatform/webhooks/WBHK00000000000000000000000001/settings \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X GET \ -d
[ { "id": "BWHS00000000000000000000000001", "type": "balance", "target": { "type": "balancePlatform", "id": "YOUR_BALANCE_PLATFORM" }, "currency": "USD", "status": "active", "conditions": [ { "balanceType": "available", "conditionType": "lessThan", "value": 500000 } ] }, { "id": "BWHS00000000000000000000000002", "type": "balance", "target": { "type": "balanceAccount", "id": "BA00000000000000000LIABLE" }, "currency": "USD", "status": "active", "conditions": [ { "balanceType": "available", "conditionType": "greaterThan", "value": 1000000 } ] } ]
View the conditions in a balance webhook setting
To get details of a balance webhook setting with the conditions for triggering the webhook, make a GET /balancePlatforms/{id}/webhooks/{id}/settings/{id} request, specifying the following IDs as path parameters:
- balance platform ID
- balance webhook ID
- balance webhook setting ID
curl https://balanceplatform-api-test.adyen.com/balancePlatforms/YourBalancePlatform/webhooks/WBHK00000000000000000000000001/settings/BWHS00000000000000000000000001 \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X GET \ -d
{ "id": "BWHS00000000000000000000000001", "type": "balance", "target": { "type": "balancePlatform", "id": "YOUR_BALANCE_PLATFORM" }, "currency": "USD", "status": "active", "conditions": [ { "balanceType": "available", "conditionType": "lessThan", "value": 500000 } ] }
Update a balance webhook setting
To update the conditions for triggering balance webhooks, make a PATCH /balancePlatforms/{id}/webhooks/{id}/settings/{id} request, specifying the following IDs as path parameters:
- balance platform ID
- balance webhook ID
- balance webhook setting ID
In the body of the request, include the following parameters:
Parameter | Required | Description |
---|---|---|
type | ![]() |
The type of the webhook you want to configure. Set this to balance. |
target.type | The resource for which you want to receive webhooks. Possible values:
|
|
target.id | The unique identifier of the target.type . This can be the ID of your balance platform, your account holder, or your account holder's balance account. |
|
currency | The currency of the balance for which you want to receive webhooks. | |
status | Specifies the status of the webhook setting. Possible values:
|
|
conditions | The array of conditions a balance change must meet for Adyen to send the webhook. | |
conditions.balanceType | The type of balance for which you want to receive webhooks. Possible values:
|
|
conditions.conditionType | Possible values: greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual. | |
conditions.value | The value limit you set in the specified balanceType and currency . |
Examples
The following examples provide an overview of the most common reasons to update a balance webhook setting.
To add a new set of conditions to a balance webhook setting, send both the existing and the new condition set in the conditions
array.
curl https://balanceplatform-api-test.adyen.com/balancePlatforms/YourBalancePlatform/webhooks/WBHK00000000000000000000000001/settings/BWHS00000000000000000000000001 \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X PATCH \ -d '{ "type": "balance", "target" : { "type": "balanceAccount", "id": "BA00000000000000000LIABLE" }, "currency": "USD", "status": "active", "conditions": [ { "balanceType": "available", "conditionType": "lessThan", "value": 500000 }, { "balanceType": "balance", "conditionType": "greaterThan", "value": 1000000 } ] }'
To remove a set of conditions from a balance webhook setting, exclude them from conditions
array when you send the update request.
You must send the conditions you want to keep in the update request.
curl https://balanceplatform-api-test.adyen.com/balancePlatforms/YourBalancePlatform/webhooks/WBHK00000000000000000000000001/settings/BWHS00000000000000000000000001 \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X PATCH \ -d '{ "type": "balance", "target" : { "type": "balanceAccount", "id": "BA00000000000000000LIABLE" }, "currency": "USD", "status": "active", "conditions": [ { "balanceType": "available", "conditionType": "lessThan", "value": 500000 } ] }'
To temporarily stop receiving webhooks for the specified conditions, set the status
of the webhook setting to inactive.
curl https://balanceplatform-api-test.adyen.com/balancePlatforms/YourBalancePlatform/webhooks/WBHK00000000000000000000000001/settings/BWHS00000000000000000000000001 \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X PATCH \ -d '{ "type": "balance", "status": "inactive" }'
Delete a balance webhook setting
If you want to permanently stop receiving webhooks for the specified conditions, send a DELETE /balancePlatforms/{id}/webhooks/{id}/settings/{id} request, specifying the following IDs as path parameters:
- balance platform ID
- balance webhook ID
- balance webhook setting ID
curl https://balanceplatform-api-test.adyen.com/balancePlatforms/YourBalancePlatform/webhooks/WBHK00000000000000000000000001/settings/BWHS00000000000000000000000001 \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X DELETE \ -d