Skip to main content
POST
Create Webhook Endpoint

Authorizations

X-API-KEY
string
header
required

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

Headers

X-Timestamp
string
required

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

Example:

"1783513683000"

Body

application/json
url
string<uri>
required

HTTPS endpoint URL. Localhost, loopback IPs, private IPs, link-local addresses, and multicast addresses are rejected.

Maximum string length: 512
Example:

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

events
enum<string>[]
required

Event names to subscribe to. 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:
description
string

Optional endpoint description.

Maximum string length: 512
Example:

"Created through the API"

enabled
boolean
default:true

Whether the endpoint is enabled.

Response

Webhook endpoint created 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