Appearance
Update webhook subscription
This endpoint allows you to update the URL endpoint where webhook events will be sent.
Endpoint PUT
http
/api/event-subscriptions/payment.status.changedheaders
http
'Content-Type: application/json'
'Accept: application/json'
'Authorization: Bearer access_token'Body parameter
json
{
"url": "https://example.com/endpoint",
"merchant_id": "9981608a-3804-4535-b66b-54c27717be73"
}You can update the URL endpoint where webhook events will be sent. This allows you to change the destination for your webhook notifications if you need to modify your server configuration or update your event handling infrastructure. Make sure the new URL is secure, accessible, and capable of processing the incoming webhook data correctly.
HTTP Code sample
1curl --location --request PUT 'https://api-gateway-sandbox.huch.tech/api/event-subscriptions/payment.status.changed' \
2 --header 'Content-Type: application/json' \
3 --header 'Accept: application/json' \
4 --header 'Authorization: Bearer ' \
5 --data-raw '{
6 "url": "https://example.com/endpoint",
7 "merchant_id": ""
8 }'
9'200 response
json
{
"event_subscription_id": "c45d2660-91e4-4166-ab76-f37f89fdb81e",
"merchant_id": "c75d2460-91e6-4867-ab26-f37f47fdb81e",
"event_type": "payment.status.changed",
"url": "https://example.com/endpoint"
}Enumerated Values
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CreateUpdateEventSubscription | True | None |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful operation | EventSubscriptionResponse |
| 400 | Bad Request | Invalid Arguments | None |
| 409 | Conflict | Event subscription already exists | None |
| 500 | Internal Server Error | Internal errors | None |