Skip to content

Inbound webhook

The inbound webhook refreshes an order record immediately when your site says “this order changed”, so the assistant tells customers the latest status. The setting is on Settings → Inbound webhook.

  1. Create secret. The secret (whsec_…) is shown once. If you rotate it, the old one stops working immediately. There is one secret per company; both sources use it.
  2. Use one of the addresses shown on the page:
    • WooCommerce: https://<your-console-host>/hooks/<company>/woocommerce
    • Your own system: https://<your-console-host>/hooks/<company>/generic

In WordPress go to WooCommerce → Settings → Advanced → Webhooks → Add webhook:

FieldValue
TopicOrder updated (and another webhook for: Order created). Optional, for instant prices: Product updated, Product created, Product deleted
Delivery URL…/hooks/<company>/woocommerce
SecretThe secret from Zitena
API versionWP REST API v3
  • The signature is verified with X-WC-Webhook-Signature (base64 HMAC-SHA256 of the body).
  • The order.created, order.updated and order.restored topics and the product topics (product.created, product.updated, product.deleted, product.restored, product.published) are processed; other topics are ignored with {"ok": true, "ignored": "<topic>"}.
  • For product topics the body is not trusted: the product is re-read from the store and updated in the catalog right away. A product the store no longer has becomes inactive.
  • The order body is written to the record directly; if it can’t be parsed, the order is re-read from the store with a single request.
  • The unsigned ping WooCommerce sends when you save a webhook has no effect.
StatusBodyMeaning
200{"ok": true, "orders": 1, "inserted": 0, "updated": 1, "unchanged": 0}Processed
200{"ok": true, "duplicate": true}The same delivery id was already processed within 24 hours
401invalid_signatureWrong signature or timestamp outside ±300 s
404not_foundCompany, source or secret not configured (the company’s existence is not revealed)
413payload_too_largeBody larger than 5 MB
422invalid_json, invalid_order or a field listInvalid body
503store_unavailableThe WooCommerce body couldn’t be parsed and the store couldn’t be reached

The same delivery id is not processed twice within 24 hours: resending is safe. A delivery id is only recorded after the signature is verified, so a forged request can’t block a real delivery. The secret and order contents are never logged.