Ensure Webhook Endpoint
Create or update a webhook endpoint by URL. This endpoint is designed for idempotent setup flows where applications need to safely create or reconcile a webhook endpoint. For existing endpoints, Clink does not return the stored plaintext signing secret unless the secret is rotated.
Authorizations
Your secret API key obtained from the Clink dashboard (Developers section)
Current timestamp in milliseconds since Unix epoch (required for request signing)
Body
HTTPS endpoint URL. Used as the idempotency key for this merchant.
512"https://example.com/api/clink/webhook"
Event names to subscribe to. Numeric event codes are not accepted.
1Supported webhook event name. Public API requests use event names, not numeric event codes.
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 ["session.complete", "order.succeeded"]Optional endpoint description.
512"Created through the API"
Whether the endpoint is enabled.
Whether the caller wants a plaintext signingSecret when available.
If true, rotate the existing secret when the stored secret cannot be returned as plaintext.
If true, always rotate the signing secret for an existing endpoint.