The four order events
Subscribe to these in your Webhook configuration.
Delivery status values
Metadata roundtrips
metadata (the arbitrary object you pass at order creation) roundtrips on order-status-changed and order-delivery-status-changed events, but not on order-canceled or order-out-of-stock. If you need to correlate those events with your internal records, store the mapping in your own database by orderId.
Webhook handler
JavaScript
Python
On-demand order fetch
You can also pull order state at any time without relying on webhooks:JavaScript
Reliability tips
- Acknowledge fast, process async. Return
200immediately and do the work in a background job. Slow handlers risk timeouts and missed retries from Snappy. - Handle duplicate deliveries. Webhooks may be delivered more than once. Make your handlers idempotent — updating a DB record to the same status is a no-op.
- Use
GET /v3/orders/{orderId}for reconciliation. On startup or after downtime, poll recent orders to catch any events you missed.
Related
- Place Orders — creating the order that these webhooks track
- Auto-claim Gifts as Fallback — a pattern that also relies on webhooks for coordination