set up woocommerce webhooks and verify their signatures

domain: woocommerce.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a webhook via the WooCommerce REST API by POSTing to `/wp-json/wc/v3/webhooks` with `name`, `topic` (e.g., `order.created`), `delivery_url`, and optionally `secret`.
  2. WooCommerce generates a secret automatically if you don't provide one — retrieve it from the webhook object's `secret` field immediately after creation, as it is only shown once.
  3. When a webhook fires, WooCommerce includes a `X-WC-Webhook-Signature` header containing a base64-encoded HMAC-SHA256 of the raw payload signed with the webhook secret.
  4. In your handler, compute HMAC-SHA256 of the raw request body using the stored secret, base64-encode the result, and compare it to the header value using a constant-time comparison.
  5. Respond with HTTP 200 within a short timeout to acknowledge delivery; WooCommerce marks webhooks as failed and eventually disables them after several consecutive delivery failures.
  6. Re-enable a disabled webhook by sending a PUT to `/wp-json/wc/v3/webhooks/{id}` with `status: active`.

Known gotchas

Related routes

Register and verify a Shopify webhook subscription
shopify.com · 4 steps · 100% success
set up and verify bigcommerce webhooks
bigcommerce.com · 6 steps · unrated
Verify BigCommerce webhook signatures and protect against replays
developer.bigcommerce.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans