client.webhooks manages your webhook endpoint subscriptions. You register a URL and a list of events you want to receive; TLDP delivers a signed HTTP POST to that URL whenever a matching event occurs. Use webhooks to drive real-time order status updates, trigger fulfilment workflows, or reconcile payments without polling.
Methods
createWebhook
Register a new webhook endpoint. Provide your HTTPS URL and the list of event types you want to subscribe to. The response includes a signing_secret that you must store securely — it is returned only once.
string
required
The HTTPS URL that TLDP should deliver event payloads to. Must be publicly reachable.
WebhookEvent[]
required
The list of event types to subscribe to. Provide one or more values from the event types table below.
string
A human-readable label for this endpoint. Optional.
listWebhooks
Retrieve all webhook endpoints registered on your account. The signing_secret is not included in list responses.
deleteWebhook
Remove a webhook endpoint permanently. TLDP stops delivering events to the endpoint immediately. Deletion cannot be undone.
testWebhook
Send a synthetic test event to a registered endpoint. Use this to verify that your server is reachable, correctly parsing the payload, and returning a 2xx response before going live.
Available Event Types
Subscribe to any combination of the following events. Pass their string values in theevents array when creating a webhook.
Orders
Shipments
Payments
Returns
Delivery Contract
- At-least-once delivery — make your handler idempotent and deduplicate on the event id.
- Signed — verify every delivery with the
signing_secretfromcreateWebhookbefore acting on it. - Respond fast — return
2xxquickly and do heavy work asynchronously; slow responses are treated as failures and retried.