Guides

Receive and verify webhooks

Verify signatures, acknowledge events, and safely process retries.

Verify before processing

Register an HTTPS endpoint in your workspace. Lumen signs each delivery with your endpoint secret. Verify the signature against the raw request body before parsing JSON or taking any action.

const event = lumen.webhooks.verify(rawBody, signature, process.env.LUMEN_WEBHOOK_SECRET);
const event = lumen.webhooks.verify(rawBody, signature, process.env.LUMEN_WEBHOOK_SECRET);
const event = lumen.webhooks.verify(rawBody, signature, process.env.LUMEN_WEBHOOK_SECRET);

Make your handler idempotent

Return a 2xx response after persisting the event to a queue. Deduplicate deliveries by event ID. Retry failed work in your queue; Lumen retries unacknowledged deliveries with exponential backoff for up to 24 hours.

Create a free website with Framer, the website builder loved by startups, designers and agencies.