Skip to main content

Overview

Instead of polling for order status, you can configure Henry to push events directly to your server via webhooks. When an order transitions state - placed, completed, cancelled - Henry fires an HTTP POST to your endpoint with a signed payload. Webhooks are configured per-cart via the settings.events array on cart.create.

How it works


1. Register a webhook endpoint

Go to the Henry Dashboard, open your app settings, and add a webhook endpoint URL. Henry will generate a webhook UUID and a webhook secret for that endpoint.
  • The UUID is used in cart settings to reference the webhook
  • The secret is used to verify incoming requests (keep it private, like an API key)

2. Configure a cart with webhook events

Pass the webhook UUID in settings.events when creating a cart. Henry fires that webhook when the specified event occurs.
To fire on specific outcomes, use a more granular event type:

3. Receive and verify the webhook

Henry sends a POST request with three important headers: Always verify the signature before processing the payload.

Verification logic

Always read the raw request body before parsing it as JSON. Parsing first can change the string representation and break signature verification.

Full server example (Node.js / Express)

Full server example (Bun)


Webhook payload structure

Henry sends a consistent envelope for all events:

Example payload


Event types reference

Events follow a dot-notation hierarchy. Subscribing to a parent event fires for all child events.

Order events

order.purchase.full vs order.purchase: a full purchase means every item in the cart was attempted together. A non-full purchase (e.g. order.purchase.complete) covers any purchase outcome regardless of whether it was full or partial.

Points & tier events

For most use cases, subscribe to order.purchase.full.complete and order.purchase.full.cancelled - this covers both success and failure for a standard checkout.

Conditionals

Each event in settings.events accepts an optional conditional that filters when the trigger fires. Two types are supported:

Next steps

Polling

Prefer polling for product search and details jobs

Universal Cart

Configure webhook events when creating a cart