Webhooks allow you to receive real-time HTTP notifications when events occur on your orders. Instead of polling the API for updates, configure a webhook URL to receive automatic notifications.Documentation Index
Fetch the complete documentation index at: https://www.zinc.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Configuration
Configure your webhook URL in the Zinc dashboard under Settings. You can also generate a webhook secret for signature verification.Webhook Secret
Your webhook secret is used to verify that incoming webhook requests are from Zinc. The secret format is:Events
Zinc sends webhooks for the following order events:| Event | Description |
|---|---|
order.started | Order has been created and queued for processing |
order.placed | Order was successfully placed with the retailer |
order.failed | Order failed after all retry attempts were exhausted |
Payload Structure
All webhook payloads follow this structure:Payload Fields
| Field | Type | Description |
|---|---|---|
event | string | The event type (e.g., order.started, order.placed, order.failed) |
order_id | string | The UUID of the order |
status | string | Current order status |
timestamp | string (ISO 8601) | When the event occurred |
data | object | Additional event-specific data |
Event-Specific Data
order.placed includes price components:
order.failed includes error information:
Security
Webhook requests include headers for verification:| Header | Description |
|---|---|
Content-Type | Always application/json |
X-Webhook-Signature | HMAC-SHA256 signature of the payload |
X-Webhook-Event | The event type |
Verifying Signatures
To verify a webhook is from Zinc, compute the HMAC-SHA256 signature of the raw request body using your webhook secret and compare it to theX-Webhook-Signature header.
Python Example:
Always verify webhook signatures before processing the payload to ensure the request originated from Zinc.
Best Practices
- Respond quickly - Return a 2xx status code as soon as possible. Process the webhook asynchronously if needed.
-
Handle duplicates - Webhooks may occasionally be delivered more than once. Use the
order_idto deduplicate. -
Verify signatures - Always validate the
X-Webhook-Signatureheader before trusting the payload. - Use HTTPS - Configure an HTTPS endpoint to ensure webhook data is encrypted in transit.
- Log events - Keep records of received webhooks for debugging and auditing.

