Skip to main content
PUT
Update

Update Webhook URL

This endpoint allows updating the webhook URL and signing secret associated with a specific event.
  • The webhook is identified by the event and the optional account_id, both sent in the request body. The path never carries the event
  • The request body should include the new configuration values for the specified event’s webhook URL
Registering, updating or removing a webhook may take up to 5 minutes to take effect. Until then, webhooks keep being delivered to the previous destination.

Request Body

string
required
The event type whose webhook will be updated. Together with account_id, it identifies the webhook.Allowed values: onboarding, payin, payout, kycExample: onboarding
string
required
Endpoint URL that will receive the webhook notifications for the selected event.URL characters: a-z, A-Z charactersMaximum length: 120 charactersExample: https://my-url.requestcatcher.com/test
string
Secret used to sign the payin, payout and kyc webhooks with HMAC-SHA256. When provided, every webhook for this event includes the x-webhook-wp-signature header.Maximum length: 255 characters. Use a long, randomly generated value.Example: whsec_9f8e7d6c5b4a3210
integer
ID of the account whose webhook will be updated: your own merchant or one of its subaccounts.When omitted, the webhook of your merchant (the authenticated account) is updated.If the account does not exist or is not linked to your merchant, the request fails with 422 and the invalid_account code. If the account has no webhook for the event, the request fails with 404.Example: 4521
Without account_id, the update always targets your merchant, even if the webhook you want to change was listed by Query under a subaccount. Send the account_id returned with the webhook to update the right one.
The update replaces the whole configuration. If secret is omitted or null, the current secret is removed and the webhooks are no longer signed. Always send the secret you want to keep.
To rotate the secret, send the new value in secret. Changes may take up to 5 minutes to take effect, so accept signatures computed with either the old or the new secret during this period.

Response

integer
ID of the account the webhook belongs to.Example: 4521
string
Type of event that was registered for the webhookAllowed values: onboarding, payin, payout, kyc
string
Endpoint URL that was registered to receive webhook notificationsExample: https://my-url.com/test
string
Secret used to sign the webhooks for this event, or null if none is set.Example: whsec_9f8e7d6c5b4a3210

Request Example