POST /v1/webhooks), Lojou makes a POST request with a JSON payload to your URL whenever one of the configured events happens. This saves you from having to poll GET /v1/orders/{id} to find out when an order’s status changed.
Available events
Pick the events via the
events field when creating the webhook (POST /v1/webhooks).
Scoping to a product
A webhook can be filtered to a single product (setproduct_details when creating it) or fire for any product in the store (leave product_details out). If you have more than one webhook registered for the same URL, Lojou groups them and sends a single delivery per URL — it won’t duplicate.
The payload
plan_subscriber is only actually populated for recurring products (subscriptions) — for one_time products those fields come back null, except portal_url, which is always built.
Delivery — what to expect
- No signature/cryptographic verification. Lojou doesn’t currently send any
X-Lojou-Signature-style header to prove the payload’s origin. Treat your endpoint URL as something only you know, and validate the content (e.g. confirm theorder_numberviaGET /v1/orders/{id}) before acting on it for anything sensitive. - No automatic retries. It’s a single
POSTattempt with a 10s timeout — if your endpoint is down or too slow, that specific delivery is lost (it’s only recorded as a failure in the webhook’s report;GET /v1/webhooks/{id}shows the summary). If you need delivery guarantees, treat webhooks as a “something changed” nudge and confirm with aGET /v1/orders/{id}call afterward. - Respond fast, with a
2xx. Anything outside the2xxrange counts as a failure in the webhook report, even if you already processed the event.
Debugging
GET /v1/webhooks/{id} returns a summary with the timestamp and status of the last delivery. To see the exact payload sent on a specific attempt and what your endpoint responded, that’s still only available from the Lojou dashboard (Settings → Webhooks → Reports) — not yet exposed through the public API.