Adyen-for-platform icon

Manage your balance webhook settings

Learn how you can update or delete your balance webhook settings.

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.

Get all settings
Expand view
Copy link to code block
Copy code
Copy code
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
Response
Expand view
Copy link to code block
Copy code
Copy code
[
{
"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
Get setting details
Expand view
Copy link to code block
Copy code
Copy code
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
Response
Expand view
Copy link to code block
Copy code
Copy code
{
"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 -white_check_mark- 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:
  • balancePlatform: receive webhooks for balance changes in your entire balance platform.
  • accountHolder: receive webhooks for balance changes of a specific user.
  • balanceAccount: receive webhooks for balance changes in a specific balance account.
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:
  • active: You receive a balance webhook if any of the conditions in this setting are met.
  • inactive: You do not receive a balance webhook even if the conditions in this settings are met.
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:
  • available: the balance available for use.
  • balance: the sum of transactions that have already been settled.
  • pending: the sum of transactions that will be settled in the future.
  • reserved: the balance currently held in reserve.
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.

Add new condition set
Expand view
Copy link to code block
Copy code
Copy code
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.

Remove condition set
Expand view
Copy link to code block
Copy code
Copy code
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.

Deactivate a setting
Expand view
Copy link to code block
Copy code
Copy code
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"
}'

If you remove the only existing condition set from the webhook setting, you will receive updates for all balance changes in the specified balance account(s).

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
Delete setting
Expand view
Copy link to code block
Copy code
Copy code
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

See also