Guides
Receive orders by webhooks
The fastest way: the order reaches you within seconds. You need a public HTTPS address that checks our signature. Used when settings.orders.delivery is webhooks.
The flow#
- Let's Pizza → Your systemA signed new-order event
POST <your URL> · order.created - Your systemChecks the signature, stores the order
- Your system → Let's Pizza2xx within 10 seconds
- Your system → Let's PizzaAcknowledge, with your number
POST /partner/v1/orders/{id}/ack
Your own subscriptions#
With the webhooks:manage scope you manage your subscriptions yourself through /partner/v1/webhooks: address and events, the delivery log, replay, a test event and a new secret. The branches are your key’s, and you receive only what is yours:
| Events | Scope needed | What you get |
|---|---|---|
order.* · invoice.issued | orders:read | Only the orders that are in your feed. |
payment.* | payments:read | Payments of your orders. |
catalog.published | catalog:read | Each new menu version published. |
branch.* · availability.changed | branches:read | Your key’s branches. |
order.ack_overdue | orders:read | Only about yourself: an order you did not acknowledge in time. |
Customer details travel whole or trimmed according to your settings.customerData as Let’s Pizza sets it now, not by the subscription request. The signing secret is shown once, at creation; if lost, rotate it.
curl -sS -X POST "$LP_BASE_URL/partner/v1/webhooks" \
-H "Authorization: Bearer $LP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
--data '{
"name": "string",
"url": "string",
"events": [
"order.created"
],
"branches": [
"string"
],
"pii": true,
"active": true
}'Your receiver#
- Read the raw body bytes, before any JSON parsing.
- Verify the signature and timestamp as in Signature verification.
- Skip the event if you already processed its id.
- Store, answer 2xx at once, then do the work after answering.
If your receiver is down#
We retry 5 times with growing delays, and any event can be replayed from the console. The retry schedule. As a safety net, pull unacknowledged orders every few minutes.
Endpoints used#
Anything marked “Coming soon” is not served yet; it joins the reference as soon as it ships.
- POST
/partner/v1/webhooksA new subscriptionwebhooks:manageAvailable - GET
/partner/v1/webhooksYour subscriptionswebhooks:manageAvailable - POST
/partner/v1/webhooks/{id}/testSend a signed test eventwebhooks:manageAvailable - POST
/partner/v1/webhooks/{id}/deliveries/{deliveryId}/replaySend a delivery againwebhooks:manageAvailable - POST
/partner/v1/orders/{id}/ackAcknowledge, with your numberorders:ackAvailable - GET
/partner/v1/orders/{id}One order and its statusorders:readAvailable