Skip to main content
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.
For the complete guide to verifying webhook signatures, handling retries, and building a reliable event consumer, see the Webhooks guide.

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.
The signing_secret is returned only once in the createWebhook response. Store it immediately in a secure secrets manager (e.g. AWS Secrets Manager, HashiCorp Vault, or an environment variable). You cannot retrieve it again — if you lose it, you must delete the endpoint and create a new one.

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 the events 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_secret from createWebhook before acting on it.
  • Respond fast — return 2xx quickly and do heavy work asynchronously; slow responses are treated as failures and retried.