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)
  2. An event occurs in OlaClick
  3. OlaClick sends a POST to your URL with the event payload
  4. Your server responds with 2xx to confirm receipt

→ See Available Events for the full list of event types you can subscribe to.

Delivery format​

Every delivery is a POST request with the following headers:

HeaderDescription
Content-TypeAlways application/json
sourceAlways OlaClick
X-OlaClick-SignatureHMAC-SHA256 signature of the request body, prefixed with sha256=

And a JSON body with this envelope:

{
"event_type": "ORDER_CREATED",
"event_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"merchant_id": "restaurant_042",
"timestamp": "2026-06-20T15:30:00.000Z",
"data": { ... }
}
FieldTypeDescription
event_typestringThe event that triggered this delivery
event_idUUIDUnique ID for this delivery — use for idempotency
merchant_idstringThe merchant identifier configured in the webhook
timestampISO 8601When the event was produced
dataobjectEvent-specific payload (see each event page)

Verifying signatures​

Every delivery is signed with your webhook's signing_secret. See Signature Verification for implementation details in Node.js, Python, Go, PHP, and Ruby.

Retries​

If your endpoint doesn't respond with 2xx, OlaClick retries with exponential backoff:

AttemptWait
130 seconds
25 minutes
330 minutes
42 hours

Webhooks with persistent failures (10+ consecutive failures for 3+ days) are automatically deactivated.

Timeout​

OlaClick waits a maximum of 10 seconds for your response.

Best practices​

  • Respond 200 immediately and process in background
  • Deduplicate by event_id — the same event may be delivered more than once
  • Verify signatures — reject requests with invalid or missing X-OlaClick-Signature

API Reference​