POST to your registered webhook URL whenever an order changes state. This page lists every event type and shows the exact payload shape you’ll receive.
See Webhook Setup & Security for how to register your endpoint and verify signatures.
Supported events
| Event | When it fires |
|---|---|
order.driver_assigned | A driver accepts and is assigned to the order |
order.picked_up | The driver marks the order as picked up from your location |
order.delivered | The driver marks the order as delivered to the customer |
order.failed | The order exhausted all driver dispatch attempts with no driver found |
order.status_changed | Any other status change not covered by the events above (legacy fallback) |
Event envelope
Every event uses the same outer envelope:| Field | Type | Description |
|---|---|---|
event | string | The event type (see catalog above) |
created_at | ISO 8601 | When the event occurred |
data.order_id | string | Yonne’s internal order identifier |
data.tracking_number | string | Customer-facing tracking reference |
data.tracking_url | string | Public tracking link — safe to share directly with your customer |
data.merchant_reference_id | string | Your own order ID, echoed back from create-order |
data.environment | string | live or test |
data.delivery_fee | number | Delivery fee in the smallest currency unit (e.g. tambala for MWK) |
data.courier | object | null | Driver details — null until a driver is assigned (see below) |
data.metadata | object | Custom key/value object you attached at order creation, echoed back |
Events
order.driver_assigned
Fires when a driver accepts and is assigned to the order. This is the first event that includes a populated courier object.
tracking_url to notify your customer so they can follow the rider in real time.
order.picked_up
Fires when the driver marks the order as collected from your pickup location.
order.delivered
Fires when the driver marks the order as successfully delivered to the customer.
order.failed
Fires when the order exhausted all driver dispatch attempts and no driver was found. The courier field is null for this event.
order.status_changed
A legacy fallback event that fires on any status transition not covered by the specific events above. Treat it as a general-purpose status update.
Handling unknown event types
New event types may be added to this catalog over time. Your handler should log and ignore events it doesn’t recognise rather than throwing an error — this prevents future additions from breaking your integration.Retry behavior
If your endpoint returns a non-2xx status or times out, Yonne retries with exponential backoff (1 min → 15 min → 60 min, up to 3 retries). Design your handler to be idempotent — receiving the same event twice should not cause duplicate side effects.
See Webhook Setup & Security for the full retry table and deduplication pattern.