Skip to main content
PATCH
/
webhook
/
endpoints
/
{id}
Update Webhook Endpoint
curl --request PATCH \
  --url https://uat-api.clinkbill.com/api/webhook/endpoints/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-Timestamp: <api-key>' \
  --data '
{
  "url": "https://example.com/api/clink/webhook",
  "events": [
    "order.succeeded",
    "invoice.paid"
  ],
  "description": "Updated through the API",
  "enabled": true
}
'
{
  "code": 200,
  "msg": "Success",
  "data": {
    "id": "whk_xxxxx",
    "url": "https://example.com/api/clink/webhook",
    "events": [
      "session.complete",
      "order.succeeded"
    ],
    "enabled": true,
    "signingSecret": "whsec_xxxxx",
    "maskedSigningSecret": "whsec_...abcd",
    "description": "Created through the API",
    "createdAt": 1782112780956,
    "updatedAt": 1782113780956
  }
}

Authorizations

X-API-KEY
string
header
required

Your secret API key obtained from the Clink dashboard (Developers section)

X-Timestamp
string
header
required

Current timestamp in milliseconds since Unix epoch (required for request signing)

Path Parameters

id
string
required

Unique identifier of the webhook endpoint.

Body

application/json
url
string<uri>

HTTPS endpoint URL. If omitted, the current URL is unchanged.

Maximum string length: 512
Example:

"https://example.com/api/clink/webhook"

events
enum<string>[]

Event names to subscribe to. If omitted, current subscriptions are unchanged. Numeric event codes are not accepted.

Minimum array length: 1

Supported webhook event name. Public API requests use event names, not numeric event codes.

Available options:
order.created,
order.succeeded,
order.failed,
refund.created,
refund.succeeded,
refund.failed,
subscription.created,
subscription.trialing,
subscription.activated,
subscription.incomplete_expired,
subscription.past_due,
subscription.cancelled,
invoice.open,
invoice.paid,
invoice.void,
order.next_action,
subscription.updated.plan_changed,
subscription.updated.plan_change_canceled,
subscription.updated.renewed,
subscription.updated.cancel_at_period_end_set,
subscription.updated.cancel_at_period_end_revoked,
session.complete,
session.expired,
dispute.created,
dispute.updated,
dispute.won,
dispute.lost,
dispute.closed,
customer.verify,
payment_method.added,
payment_method.default_change,
risk_rule.updated,
agent_order.succeeded,
agent_order.failed,
agent_refund.succeeded,
agent_refund.failed,
agent_refund.approved,
agent_refund.rejected,
payment_method.update,
purchase_instruction.created,
purchase_instruction.activated,
purchase_instruction.updated,
purchase_instruction.cancelled,
vic_device.binding_succeeded
Example:
["order.succeeded", "invoice.paid"]
description
string

Endpoint description. Send an empty string to clear it.

Maximum string length: 512
Example:

"Updated through the API"

enabled
boolean

Whether the endpoint is enabled.

Response

Webhook endpoint updated successfully

Body of the response message

code
integer<int32>

Response status code, 200 when success

Example:

200

msg
string

Brief description of what happened, 'success' when happy case

Example:

"Success"

data
object