Create an endpoint
Use a public URL that can receive webhook requests. Your organization can have up to ten endpoints, each with a distinct URL.- Dashboard
- API
- Open Developers.
- Open the Webhooks tab.
- Click Add an endpoint.
- Enter a name.
- Enter the endpoint URL.
- Select Standard Webhooks as the signature.
- Select the events to receive.
- Click Create endpoint.
Choose events
Select the events your application needs. For example, usecontract.started to react to a Contract starting, or invoice.created to react to a finalized invoice.
In the API, event_types selects the events delivered to an endpoint. null or ["*"] selects all events; an empty array selects none. See the endpoint API reference for the full event list.
Verify signatures
Lago signs each delivery with your endpoint’s signing key. Verify the raw request body and thewebhook-id, webhook-timestamp and webhook-signature headers with a Standard Webhooks library before processing the event.
Each endpoint has its own signing key, prefixed with whsec_. To find it in the Dashboard, open Developers > Webhooks, select the endpoint, then reveal its signing key.
Through the API, retrieve the endpoint with expands[]=signing_keys. Reading signing keys requires webhook_endpoint write permission; the API returns 403 without it.
Retrieve the endpoint signing keys
signing_keys array is ordered oldest first. Use the most recent key’s secret_key for verification. Store it securely in your application instead of retrieving it for every delivery.
Pass the request body to the verification library exactly as received. Parsing and serializing the JSON again can change the body and invalidate the signature. Keep the library’s timestamp checks enabled to protect against replayed messages.
Existing endpoint compatibility
Existing endpoint compatibility
New endpoints created through
/api/v2/webhook_endpoints use Standard Webhooks. Existing JWT and HMAC endpoints continue to work. See the shared signature reference for those algorithms.Handle deliveries and retries
Return200, 201, 202 or 204 to acknowledge a delivery. Lago retries failed deliveries. By default, it makes up to three attempts: the initial delivery and two retries.
Use webhook-id to identify messages you have already processed. The identifier stays the same when Lago retries a message. Verify the signature before using the identifier or processing the payload.
On self-hosted instances, LAGO_WEBHOOK_ATTEMPTS sets the total number of attempts. LAGO_WEBHOOK_TIMEOUT_SECONDS sets the request timeout, which defaults to 30 seconds.
Manage endpoints
PUT and PATCH accept partial updates. Omitted fields are unchanged.
Inspect delivery logs
- Open Developers.
- Open the Webhooks tab.
- Select an endpoint.
- Open Deliveries.
- Filter the deliveries.
- Select a delivery to inspect its payload, response and retry count.

Webhook deliveries
Next steps
Logs
Investigate recorded activity and API requests.
Create a webhook endpoint (API)
Endpoint fields and supported event types.