> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gowasl.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Wasl Webhook: Final Order Update After Completion

> Receive the final delivery fee, distance, and full order details after Wasl marks an order as complete, for reconciliation and record-keeping.

Wasl sends an Order Update webhook to your registered endpoint after an order is completed. This event delivers the final, confirmed delivery fee and distance alongside the full order details — including customer information and the timestamps you need for reconciliation. Use this event to close out the order in your system, update your billing records, and confirm delivery to your customers.

This is distinct from the [Post-Order Creation](/api-reference/webhooks/post-order-creation) webhook, which is sent at order creation with estimated values. The Order Update webhook reflects the actual figures recorded at completion.

## Delivery Direction

This webhook is sent **by Wasl to your server** — you do not call this endpoint yourself.

```
POST your-webhook-url
Content-Type: application/json
```

## Payload Fields

<ParamField body="order_number" type="string">
  The unique Wasl order number for this delivery.
</ParamField>

<ParamField body="vendor_id" type="string">
  Your unique vendor identifier on the Wasl platform.
</ParamField>

<ParamField body="branch_id" type="string">
  The unique identifier of the branch associated with this order.
</ParamField>

<ParamField body="vendor_order_id" type="string">
  Your internal order ID as provided at order creation. Use this to match the event to your records.
</ParamField>

<ParamField body="customer_name" type="string">
  The full name of the customer who received the delivery.
</ParamField>

<ParamField body="mobile_number" type="string">
  The customer's phone number, including country code.
</ParamField>

<ParamField body="created_at" type="string">
  The UTC datetime string for when the order was originally created on the Wasl platform.
</ParamField>

<ParamField body="delivery_fee" type="string">
  The final delivery fee charged for this order, returned as a numeric string (e.g. `"4.620"`). Parse to a float or decimal type before storing or displaying.
</ParamField>

<ParamField body="delivery_distance" type="string">
  The total delivery distance in kilometres as recorded at completion, returned as a numeric string (e.g. `"34.9990"`). Parse to a float or decimal type before use.
</ParamField>

<ParamField body="webhook_token" type="string">
  A secret token for verifying that the request originated from Wasl. Returns `null` if no webhook token has been configured in your account. See the [Webhooks Overview](/api-reference/webhooks/overview) for details.
</ParamField>

## Example Payload

```json Payload theme={null}
{
  "order_number": "B-6MASZ",
  "vendor_id": "96fea793-cee4-475a-a2e6-8159d06e52b0",
  "branch_id": "3a64177f-61de-4b76-9d3c-1ccfa0b44411",
  "vendor_order_id": "2189popp",
  "customer_name": "Reshma Suresh",
  "mobile_number": "+96560459486",
  "created_at": "2022-12-28T09:40:41.717416Z",
  "delivery_fee": "4.620",
  "delivery_distance": "34.9990",
  "webhook_token": null
}
```

<Warning>
  The `webhook_token` field may be `null` if you have not configured a webhook secret in your Wasl account settings. We strongly recommend setting a token so you can verify the authenticity of every incoming event. Without it, your endpoint cannot distinguish legitimate Wasl calls from spoofed requests.
</Warning>

## Handling the Event

After validating the `webhook_token` (if configured), a typical handler will:

1. Look up the order using `vendor_order_id`.
2. Update the order's final delivery fee and distance with the values from the payload.
3. Mark the order as completed in your system.
4. Trigger any downstream processes — such as invoicing, customer notifications, or reporting.
5. Return HTTP 200 to acknowledge receipt.

<Tip>
  Reconcile the final `delivery_fee` in this event against the estimated fee you received in the [Post-Order Creation](/api-reference/webhooks/post-order-creation) webhook. Differences can occur due to route adjustments during delivery.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.