Balance webhooks are in pilot phase. Some of the processes and documentation may change as the feature evolves.
Adyen can send you webhooks to notify you of balance changes in your balance platform. This can help you avoid negative balances in your users’ balance accounts. To receive these webhooks, you must subscribe to the Balance webhook in your Customer Area. Use the Configuration API to set the conditions that a balance change must meet for Adyen to send a balance webhook:
- In your entire balance platform
- In the balance accounts of specific account holders
- In a specific balance account
Requirements
1. Subscribe to the balance webhook
To receive notifications about balance changes in you balance platform, you must subscribe to the Balance webhook in your Customer Area. To subscribe to the balance webhook:- Log in to your company account in your Customer Area.
- Go to Developers > Webhooks.
- Select the Platforms tab.
-
Select **Create new webhook.
If you have multiple balance platforms, select the one where you want to configure the new webhook. - Next to Balance Webhook, select Add.
- Under General, select the toggle to enable the webhook. You can also provide a description.
- Under Server configuration, enter your webhook server’s public URL and select an encryption protocol.
-
Under Security, configure the following:
- Select Save configuration.
- Take note of the ID of the webhook. You need it to configure the webhook settings with the Configuration API.
2. Configure the balance webhook
To set conditions when Adyen sends webhooks for balance changes in your balance platform, make a POST /balancePlatforms/{id}/webhooks/{id}/settings request, specifying the balance platform ID and the balance webhook ID as path parameters. In the body of the request, include the following parameters:
The following example shows how you can set a balance condition for the balance webhook to get notified when the available balance in your liable balance account drops below USD 5000.
Configure balance webhook setting
id of the balance webhook setting. You will need it later if you want to view, modify, or delete the webhook configuration settings, or want to match the webhook event you receive with the setting you’re interested in.
Balance webhook setting successfully configured
Troubleshooting
You may receive errors when setting balance webhook conditions. The following examples show some of the most common issues and how to resolve them. **Duplicated conditions
Error code 1047_002Solution
Make a PATCH /balancePlatforms/{id}/webhooks/{id}/settings/{id} request and change or delete one of the duplicated condition values. **Account not found
Error code 1047_404Solution
- Check the ID of the target balance platform, account holder, or balance account included in the response.
- Resend the POST /balancePlatforms/{id}/webhooks/{id}/settings/{id} request with the correct ID.
Invalid currency provided
Error code 1047_001Solution
- Check the currency code in the response.
- Resend the POST /balancePlatforms/{id}/webhooks/{id}/settings/{id} request with the correct 3-letter ISO currency code.
