Docs Your customers

Webhooks (Pro)

Send orders and other events to another system as they happen, signed with a secret.

A webhook sends what happens in the restaurant (a new order, an order accepted or ready, a delivery made, the day closed…) to another system as it happens: a delivery service, an accounting tool, a dashboard or your own code.

Open Restaurant → Webhooks (owners).

Adding a webhook

  1. Click Add webhook and give it a name.
  2. Address that receives it: the receiving system's URL, reachable from the internet (for example https://example.com/hooks/plattivo).
  3. Events: tick Every order event, other groups, or single events such as day.closed.
  4. Include customers' names, phone numbers, email and addresses: turn this off when the receiving system doesn't need them.
  5. Save webhook. Plattivo shows the webhook's secret once. Copy it into the receiving system: it uses the secret to check that a message really comes from your restaurant.

Send a test sends a webhook.test event at once and tells you what the receiver answered.

What is sent

Each event is a POST with a JSON body:

{
  "id": "7f3c…",
  "type": "order.accepted",
  "created_at": "2026-10-29T12:30:00Z",
  "location_id": 1,
  "data": {
    "entity": "order",
    "entity_id": 482,
    "payload": { "state": "accepted" },
    "order": { "id": 482, "number": 47, "type": "delivery", "state": "accepted", "lines": [], "totals": {}, "customer": {} }
  }
}

data.order is there when the event is about an order: its lines, totals, payment, customer, promise and delivery, as staff see them.

Headers:

  • X-Plattivo-Event: the event type;
  • X-Plattivo-Delivery: the delivery's id, the same as id in the body (a resend keeps it, so receivers can skip duplicates);
  • X-Plattivo-Webhook: the webhook's number;
  • X-Plattivo-Signature: sha256= followed by the HMAC-SHA256 of the raw body, keyed with the secret.

Checking the signature

PHP:

$body     = file_get_contents( 'php://input' );
$expected = 'sha256=' . hash_hmac( 'sha256', $body, $secret );
if ( ! hash_equals( $expected, $_SERVER['HTTP_X_PLATTIVO_SIGNATURE'] ?? '' ) ) {
	http_response_code( 401 );
	exit;
}

Node.js (keep the raw body, before parsing JSON):

const crypto = require('crypto');
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const given = req.get('X-Plattivo-Signature') || '';
const ok = given.length === expected.length && crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));

When the receiver doesn't answer

The receiver has 10 seconds to answer with a 2xx status. Otherwise Plattivo tries again after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours.

After 20 failed tries in a row the webhook is turned off. Owners then see a notice in wp-admin with the reason; fix the receiver, then click Turn on.

Deliveries lists the last 100 sends with their result. Send again sends one of them again, with the same body and id.

Other actions

  • Pause stops sending until you turn the webhook on again.
  • New secret replaces the secret; the old one stops working at once.
  • Remove deletes the webhook and its deliveries.

Using WooCommerce's webhook screen instead

WooCommerce → Settings → Advanced → Webhooks also lists Plattivo's events as topics such as Plattivo: order.accepted, or Plattivo: every event. They send the same body, always with customers' details, signed the WooCommerce way (X-WC-Webhook-Signature).

Still stuck? Email [email protected] and a real person will reply, usually within two working days.