Skip to main content

Webhook Events

Settlx sends HTTP POST requests to your endpoint when invoice, payment, and subscription lifecycle events occur. Webhooks let you react to events in real time — confirming orders, provisioning access, updating your database, or triggering downstream workflows — without polling the API.

Setting up webhooks

Configure your webhook URL in Settings → Developer on the dashboard. This single URL receives all event types — both invoice and subscription events. Your webhook secret is also set from Settings → Developer. You will need it to verify incoming requests.

Invoice event types

Subscription event types

Payload format

Invoice events

Invoice events use a nested data envelope:

Subscription events

Subscription events use a flat payload — fields are at the top level:
Both event types are delivered to the same webhook URL and signed with the same secret. Use the event field to distinguish them — invoice events start with invoice., subscription events start with subscriber..
Invoice and subscription webhooks share the same signing scheme but have different headers, retry policies, and persistence behaviour. The sections below call out where they diverge.

Request headers

Invoice webhooks

Subscription webhooks

If you filter incoming webhooks on the X-Webhook-Event header, you will silently drop subscription events. Either also check X-Settlx-Event, or use the top-level event field in the parsed JSON body — that field is consistent across both webhook types.

Idempotency

Signature verification

Every delivery includes an X-Webhook-Signature header. You must verify it before processing any event. See Webhook Integration for full verification examples in Node.js, Python, PHP, and Go.

Retry policy

The retry policy differs by webhook type.

Invoice webhooks

If your endpoint returns a non-2xx status or does not respond within 30 seconds, Settlx retries up to 10 times with exponential backoff: After 10 failed attempts the delivery is marked permanently failed. Failed and pending deliveries appear in Webhook Logs in the dashboard, where you can inspect the payload and manually retry.

Subscription webhooks

Subscription webhooks use a much shorter retry budget — 3 attempts with 1s and 2s backoff, ~10 second per-attempt timeout. They are not persisted to the dashboard’s Webhook Logs. If your endpoint is down for more than a few seconds, the subscription event is lost and cannot be replayed. If reliability matters more than latency, run an idempotent reconciliation job that periodically pulls subscriber state via the API and brings your local cache up to date.

Response requirements

Your endpoint must return a 2xx HTTP status within 30 seconds (invoice) / 10 seconds (subscription). Any 2xx code is accepted — 200, 201, and 204 all count as successful delivery.

Delivery status (invoice webhooks only)

The webhook_logs.status field can be one of: Subscription webhooks do not have a status field because they are not persisted.

Testing webhooks

Use the Test Webhook endpoint to send a simulated event to your URL without waiting for a real payment. Useful for verifying your handler logic and signature verification during development.
Test webhooks do not appear in the dashboard’s Webhook Logs view. They are sent ad-hoc and not persisted. Real events fired by actual invoice or subscription state changes are logged.