Validate Xero webhook signatures to authenticate incoming payloads

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

Steps

  1. In the Xero Developer portal, register your webhook endpoint URL and record the webhook key provided for your app.
  2. When a POST request arrives at your endpoint, capture the raw request body bytes before any parsing.
  3. Compute an HMAC-SHA256 of the raw body using your webhook key as the secret.
  4. Base64-encode the resulting HMAC digest and compare it to the value in the x-xero-signature header of the incoming request.
  5. If the values match, the payload is authentic; respond with HTTP 200. If they do not match, respond with HTTP 401.
  6. Parse the verified payload to extract the array of events, each containing tenantId, eventType, and resourceId for further processing.

Known gotchas

Related routes

Verify a Lever webhook signature to authenticate incoming payloads
lever.co · 6 steps · unrated
Parse and verify the signature of incoming Zenoti webhook payloads
docs.zenoti.com · 5 steps · unrated
Subscribe to Lodgify webhooks and verify inbound event payloads using HMAC signature validation
docs.lodgify.com · 5 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