> ## 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: Post-Order Creation Delivery Details

> Receive estimated pickup and delivery times, delivery fee, and distance immediately after Wasl successfully creates and assigns an order.

Wasl sends a Post-Order Creation webhook to your registered endpoint shortly after an order is successfully created and assigned on the platform. This event gives you the confirmed delivery details for the order — including estimated pickup and delivery times, the actual delivery fee, and the distance in kilometres — so you can present this information to your customers and update your records without a separate lookup call.

The `vendor_order_id` field mirrors the order ID you supplied at creation, making it straightforward to match the incoming event to the correct record in your system.

## 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 order number assigned by Wasl for this delivery.
</ParamField>

<ParamField body="vendor_order_id" type="string">
  Your unique order identifier as provided when the order was created. Use this to correlate the event with your internal records.
</ParamField>

<ParamField body="store_id" type="string">
  Your store identifier if you included it in the original order request. Returns `null` if no store ID was provided.
</ParamField>

<ParamField body="estimated_delivery_at" type="string">
  The estimated time of delivery to the customer, expressed as a UTC datetime string.
</ParamField>

<ParamField body="estimated_pickup_at" type="string">
  The estimated time the driver will pick up the order from your location, expressed as a UTC datetime string.
</ParamField>

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

<ParamField body="delivery_distance" type="string">
  The delivery distance in kilometres from pickup to drop-off, returned as a numeric string (e.g. `"13.10"`). 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. Always validate this before processing the payload. See the [Webhooks Overview](/api-reference/webhooks/overview) for details.
</ParamField>

## Example Payload

```json Payload theme={null}
{
  "order_number": "B-6MAG9",
  "vendor_order_id": "9TFE-TH432",
  "store_id": null,
  "estimated_delivery_at": "2022-12-06T10:55:52.349242Z",
  "estimated_pickup_at": "2022-12-06T10:26:52.349208Z",
  "delivery_fee": "1.25",
  "delivery_distance": "13.10",
  "webhook_token": "######"
}
```

## Handling the Event

After validating the `webhook_token`, a typical handler will:

1. Look up the order in your system using `vendor_order_id`.
2. Store `order_number` for use in subsequent webhook correlation.
3. Record `estimated_pickup_at` and `estimated_delivery_at` to display to your customer.
4. Update the order's delivery fee and distance with the confirmed values.
5. Return HTTP 200 to acknowledge receipt.

<Tip>
  Show your customer the `estimated_delivery_at` time as soon as you receive this event. Setting accurate delivery expectations upfront reduces inbound support requests significantly.
</Tip>


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