Skip to content

Update webhook subscription

PATCH
/api/webhooks/subscription/{id}
Code sample: Shell / cURL
curl --request PATCH \
--url https://api.ztlpay.io/api/webhooks/subscription/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "targetUrl": "https://partner.example/webhooks/ztl", "eventTypes": [ "PAYMENT_STATUS" ] }'

Replace the endpoint and event types. Both fields are required. Use the bearer-token endpoint to set or rotate authentication. Already queued deliveries retain their original endpoint and credentials.

id
required
string format: uuid
Media typeapplication/json
object
targetUrl
required

Public HTTPS endpoint with a host and no embedded username or password. Requires a valid publicly trusted TLS certificate. Use the test endpoint to verify reachability.

string format: uri
Example
https://partner.example/webhooks/ztl
eventTypes
required
Array<string>
>= 1 items unique items
Allowed values: PAYMENT_STATUS PAYMENT_STATUS_UNSIGNED PAYMENT_STATUS_IN_PROGRESS PAYMENT_STATUS_REJECTED PAYMENT_STATUS_COMPLETED PAYMENT_STATUS_CANCELLED PAYMENT_STATUS_CUSTOMER_ACTION_REQUIRED

Updated subscription.

Media typeapplication/json
object
id
required
string format: uuid
targetUrl
required
string format: uri
enabled
required
boolean
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
eventTypes
required
Array<string>
unique items
Allowed values: PAYMENT_STATUS PAYMENT_STATUS_UNSIGNED PAYMENT_STATUS_IN_PROGRESS PAYMENT_STATUS_REJECTED PAYMENT_STATUS_COMPLETED PAYMENT_STATUS_CANCELLED PAYMENT_STATUS_CUSTOMER_ACTION_REQUIRED
hasBearerToken
required
boolean
Example
{
"eventTypes": [
"PAYMENT_STATUS"
]
}

Invalid target URL or event type.

Subscription was not found.