Skip to main content
The Track Order Fulfillment pattern subscribes to Snappy’s order webhooks and keeps your system — and the recipient — up to date as the order moves from confirmed to delivered. This is push-based: Snappy calls your endpoint on each status change.

The four order events

Subscribe to these in your Webhook configuration.

Delivery status values

V3 delivery statuses use snake_case, not camelCase. Use in_transit and out_for_delivery — not inTransit / outForDelivery.

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:
This is useful for reconciliation, initial page loads, or as a fallback if your webhook handler missed an event.
JavaScript

Reliability tips

  • Acknowledge fast, process async. Return 200 immediately 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.
Last modified on July 27, 2026