Skip to main content

Webhooks

Webhooks allow you to receive real-time notifications when events occur in OlaClick. Instead of polling, OlaClick sends a POST to your endpoint every time something relevant happens.

How it works

  1. You register a URL via the API (see Create Webhook in the REST API Reference)
  2. An event occurs in OlaClick (e.g. an order is created)
  3. OlaClick sends a POST to your URL with the event payload
  4. Your server responds with 2xx to confirm receipt

Available events

EventDescription
ORDER_CREATEDA customer completes a new order
ORDER_UPDATEDOrder status changes (confirmed, preparing, delivered, cancelled)
ORDER_DELETEDAn order is deleted from the system

Delivery format

Every delivery includes a source: OlaClick header and a JSON body:

{
"event_type": "ORDER_CREATED",
"event_id": "unique-event-uuid",
"merchant_id": "restaurant_042",
"timestamp": "2026-06-20T15:30:00.000Z",
"data": { ... }
}

Use event_id for idempotency — the same event may be delivered more than once due to retries.

Retries

If your endpoint doesn't respond with a success code, OlaClick retries up to max_retry times with exponential backoff (30s, 60s, 120s, ...).

Best practices

  • Respond 200 immediately and process in background
  • Deduplicate by event_id
  • Verify the source header equals OlaClick
  • Use custom webhook_headers to authenticate deliveries

API Reference

The full CRUD for managing webhooks is in the REST API Reference under the Webhooks section.