Events

All webhook events share the same payload structure -- the top-level category field tells you what event fired, and the payload object contains the order at the time of the event. The key field to watch is payload.status, which reflects the order's current state.

Events reference

Eventpayload.statusDescription
ORDER_CREATEDpreparingA new order has been placed and payment confirmed
ORDER_ASSIGNEDpreparingA rider has been assigned to collect the order
ORDER_AWAITING_PICKUPawaiting_pickupThe rider has arrived at your location and is waiting to collect
ORDER_PICKED_UPpickedThe rider has collected the order and is heading to the customer
ORDER_ARRIVED_AT_CUSTOMER_LOCATIONarrivedThe rider has arrived at the customer's location
ORDER_COMPLETEcompletedThe order has been successfully delivered

Payload field reference

Every event delivers the same order object in the payload field. Here's what each field means:

Order fields:

FieldTypeDescription
idintegerInternal order ID
referencestringYour order reference
statusstringCurrent order status — use this to track order progress
summarystringShort text summary of the order items
total_priceintegerTotal order amount in the smallest currency unit
delivery_priceintegerDelivery fee in the smallest currency unit
currencystringCurrency code (e.g. NGN)
sourcestringHow the order was placed (e.g. api)
classstringOrder type (e.g. delivery)
created_atstringISO 8601 timestamp when the order was created
updated_atstringISO 8601 timestamp of the last update
time_payment_confirmedstringISO 8601 timestamp when payment was confirmed
time_customer_received_orderstringISO 8601 timestamp when the customer received the order. null until delivered.
actual_delivery_timestringActual delivery duration. null until delivered.
driverobjectAssigned rider details. Empty object until a rider is assigned.

Customer fields (customer):

FieldTypeDescription
idintegerInternal customer ID
first_namestringCustomer's first name
last_namestringCustomer's last name
emailstringCustomer's email address
phonestringCustomer's phone number
country_codestringCustomer's country code

Items array (items[]):

FieldTypeDescription
idintegerMenu item ID
descriptionstringItem name/description
quantityintegerNumber of units ordered
price_per_quantityintegerPrice per unit in the smallest currency unit

Timeline array (timeline[]):

FieldTypeDescription
actionstringThe timeline action (e.g. ORDER_CREATED)
descriptionstringHuman-readable description of the action
created_atstringISO 8601 timestamp of when the action occurred

Address fields (customer_address, vendor_address):

FieldTypeDescription
idintegerInternal address ID
streetstringFull street address
pretty_namestringDisplay-friendly address string
citystringCity
statestringState
countrystringCountry
coordinate.xnumberLongitude
coordinate.ynumberLatitude

Vendor fields (vendor_information):

FieldTypeDescription
namestringVendor store name

Sample payload

Here is a complete example of an ORDER_CREATED webhook:

{
  "category": "ORDER_CREATED",
  "description": "New order",
  "payload": {
    "id": 1453,
    "reference": "testing119312",
    "status": "preparing",
    "summary": "40 portions of Beef.",
    "total_price": 2130000,
    "delivery_price": 80000,
    "currency": "NGN",
    "source": "api",
    "class": "delivery",
    "created_at": "2022-11-25T17:03:40.000Z",
    "updated_at": "2022-11-25T17:03:55.000Z",
    "time_payment_confirmed": "2022-11-25T17:03:43.000Z",
    "time_customer_received_order": null,
    "actual_delivery_time": null,
    "driver": {},
    "customer": {
      "id": 70,
      "first_name": "Dave",
      "last_name": "Aluks",
      "email": "[email protected]",
      "phone": "08142272922",
      "country_code": null
    },
    "items": [
      {
        "id": 2408,
        "description": "Pure beef meat",
        "quantity": 40,
        "price_per_quantity": 50000
      }
    ],
    "timeline": [
      {
        "action": "ORDER_CREATED",
        "description": "Order created",
        "created_at": "2022-11-25T17:03:40.000Z"
      },
      {
        "action": "MADE_PAYMENT",
        "description": "Made payment using none",
        "created_at": "2022-11-25T17:03:42.000Z"
      },
      {
        "action": "VENDOR_ACCEPTED_ORDER",
        "description": "Vendor accepted the order",
        "created_at": "2022-11-25T17:03:46.000Z"
      }
    ],
    "customer_address": {
      "id": 531,
      "street": "33 Adisa Coker St, Ojodu, Lagos",
      "pretty_name": "33 Adisa Coker St, Ojodu, Lagos",
      "city": "Ojodu",
      "state": "Lagos",
      "country": "NG",
      "coordinate": {
        "x": 3.3393804,
        "y": 6.6568331
      }
    },
    "vendor_address": {
      "id": 531,
      "street": "33 Adisa Coker St, Ojodu, Lagos",
      "pretty_name": "33 Adisa Coker St, Ojodu, Lagos",
      "city": "Ojodu",
      "state": "Lagos",
      "country": "NG",
      "coordinate": {
        "x": 3.3393804,
        "y": 6.6568331
      }
    },
    "vendor_information": {
      "name": "Suya Spots"
    }
  }
}

The payload structure is the same across all events. Only category, description, and payload.status change between events.