ZyloPaydocs
Webhook endpoints

Update a webhook endpoint

Change the URL, subscribed events or description, or disable / re-enable the endpoint.

PATCH/v1/webhook_endpoints/{id}scope webhooks:manage

Path parameters

idstringrequired

Webhook endpoint ID (we_…).

Body parameters

urlstring

Up to 2048 characters.

enabled_eventsarray of strings

Event types to receive: exact types, families such as payment_intent.*, or * for all. Available: payment.succeeded, payment.refunded, payment_intent.created, payment_intent.requires_action, payment_intent.processing, payment_intent.succeeded, payment_intent.payment_failed, payment_intent.canceled, refund.created, refund.succeeded, refund.failed, terminal.created, terminal.deactivated, terminal.deleted, kyb.status_changed.

descriptionstring

Up to 500 characters.

disabledboolean

true stops deliveries (events are kept and delivered when re-enabled, within 3 days); false re-enables and resets the failure window.

Headers

ZyloPay-Versionstring

Pin the request to an API version (2026-09-28). Defaults to the version the API key was created with.

Idempotency-Keystring

Recommended. A unique key per operation (a UUID v4); retries with the same key and body return the first response.

Returns

HTTP 200 with the webhook endpoint object.

Errors

StatusMeaning
400Invalid request (invalid_request_error / idempotency_error).
401Missing, invalid, expired or revoked API key (authentication_error).
403The key lacks the scope, the IP is not allowed, or the account is disabled (permission_error).
409Conflict: idempotency key reused or in progress, or the object is in the wrong state.
429Rate limit reached for this key (rate_limit_error); see Retry-After.
500Internal error (api_error). Retry with the same Idempotency-Key.

Branch on error.code. Every code is listed in error codes.

Example request

curl https://zylopay-api.fly.dev/api/v1/webhook_endpoints/we_2Lk9Qm4Xz7Pv1Rt8Wb3Ns6Hd \
  -X PATCH \
  -H "Authorization: Bearer $ZYLOPAY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled_events": [
      "*"
    ]
  }'

Example response

{
  "id": "we_2Lk9Qm4Xz7Pv1Rt8Wb3Ns6Hd",
  "object": "webhook_endpoint",
  "livemode": false,
  "url": "https://example.com/zylopay/webhooks",
  "description": "Order service (test)",
  "enabled_events": [
    "*"
  ],
  "status": "enabled",
  "disabled_reason": null,
  "api_version": "2026-09-28",
  "failing_since": null,
  "last_success_at": "2026-09-28T14:02:41.000Z",
  "secret_rotation_ends_at": null,
  "created": "2026-09-20T10:00:00.000Z",
  "updated": "2026-09-28T11:00:00.000Z"
}

On this page