Verify EasyPost webhook signatures using the current HMAC header

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

Steps

  1. When creating or updating a webhook at POST /v2/webhooks, supply a webhook_secret string that EasyPost will use to sign payloads.
  2. On every inbound POST from EasyPost, read the x-hmac-signature-v2 header — this is the current signed-hash header (older header names are deprecated).
  3. Compute HMAC-SHA256 over the raw request body bytes using your webhook_secret as the key, then Base64-encode the digest.
  4. Compare your computed value to the x-hmac-signature-v2 header value using a constant-time comparison function to prevent timing attacks.
  5. If the values do not match, return HTTP 401 and discard the payload; do not process events from unverified requests.
  6. Use EasyPost's official client-library validate_webhook() helper to handle timestamp validation and replay-attack prevention automatically.

Known gotchas

Related routes

Subscribe to EasyPost webhooks and validate HMAC signatures
easypost.com · 5 steps · unrated
Verify AfterShip Tracking API webhook payloads using the HMAC signature header
aftership.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