Skip to main content
Crave sends webhook events to your server when key actions occur — such as an order being placed, confirmed, or completed. Use webhooks to trigger fulfillment workflows, send notifications, or sync data with external systems.

How webhooks work

1

Configure a webhook URL

Register your endpoint in the Crave Dashboard under Settings > Webhooks.
2

Crave sends a POST request

When an event occurs, Crave sends a JSON payload to your URL.
3

Your server processes the event

Parse the payload, verify the signature, and execute your business logic.
4

Return a 200 response

Acknowledge receipt within 10 seconds. Crave retries on failure.

Event types

EventTrigger
order.createdPayment succeeds and order is created
order.confirmedRestaurant confirms the order
order.readyOrder is ready for pickup or delivery
order.completedOrder is fulfilled
order.cancelledOrder is cancelled by restaurant or customer
cart.abandonedCart has been inactive for the configured timeout

Payload format

Every webhook delivery sends a POST request with a JSON body:

Verify webhook signatures

Every webhook includes a X-Crave-Signature header containing an HMAC-SHA256 signature. Verify it to ensure the request came from Crave.
Always verify the signature before processing the event. Without verification, an attacker could send fake events to your endpoint.

Retry policy

If your endpoint returns a non-2xx status or times out (10 seconds), Crave retries with exponential backoff:
AttemptDelay
1st retry30 seconds
2nd retry2 minutes
3rd retry15 minutes
4th retry1 hour
5th retry4 hours
After 5 failed attempts, the event is marked as failed. You can manually retry failed events from the Dashboard.

Idempotency

Webhook deliveries may arrive more than once. Use the id field to deduplicate:

Common use cases

Send an order confirmation email:
Sync with a POS system:
Track abandoned carts:

Test webhooks locally

Use a tunnel service to expose your local server during development:
The Dashboard shows a delivery log for each webhook endpoint. Use it to inspect payloads and debug failed deliveries.

Next steps

Testing

Test your webhook handlers with mock events.

Deployment

Deploy your storefront and configure production webhooks.