Register a webhook endpoint
1
Create the endpoint
Send a Response (
POST /v1/webhook-endpoints with the URL you want Folio to call. Optionally restrict which event types are delivered; omitting events subscribes to all types.201 Created):2
Verify the signature on every delivery
Folio signs each delivery with an The HMAC-SHA256 is computed over
X-Signature header. The header value has the format:"<timestamp>." + raw_body (the timestamp as a decimal string, a literal ., then the raw request bytes), keyed with your endpoint secret. Always verify this signature before acting on the payload. Use a constant-time comparison to prevent timing attacks.Compute the HMAC over the raw bytes of the body before any JSON parsing. Parsing and re-serialising can alter whitespace and break the signature.
3
Handle the event payload
Every delivery is a Respond with any
POST with Content-Type: application/json. The payload contains the event object:2xx status as quickly as possible. Offload heavy work to a background queue — Folio considers a delivery successful on any 2xx.Event types
Retries and backoff
If your server returns a non-2xx response (or times out), Folio retries the delivery with exponential backoff. Each delivery attempt is tracked with a WebhookDeliverySummary object containing status (pending | succeeded | failed | dead), attempts, last_status_code, and next_attempt_at. A delivery is marked dead after all retry attempts are exhausted.
List your endpoints
secret — only the secret_prefix is shown.