Guides
Webhooks
Receive Inspow events in your system — set up an endpoint, verify the signature, retries, deduplication, test and resend.
With webhooks, Inspow tells your system when something happens in your Organization (a
subscription is activated, an invoice is paid…) without you having to poll the API. Each
notification is a POST with an event in JSON, signed with the
Standard Webhooks standard.
Set up an endpoint
Section titled “Set up an endpoint”- In the console, go to Developers → Webhooks tab → Add endpoint.
- Enter the URL that will receive the events. It must start with
https://, point to a public internet address and carry no user or password. - Add a description to recognize it (optional).
- Choose the events: All, including the ones we add later, or Choose the types you care about. You can only pick the available ones from the catalog.
- Save and copy the secret (
whsec_…): you need it to verify the signature. To see it later, open the endpoint and click Show.
Your plan sets how many endpoints you can have (see Limits).
What your endpoint receives
Section titled “What your endpoint receives”A POST with the event in the body and these headers:
| Header | Content |
|---|---|
content-type | application/json |
user-agent | Inspow-Webhooks/1 |
webhook-id | The event id (evt_…). It is the same across all retries and resends. |
webhook-timestamp | Unix seconds of the attempt. |
webhook-signature | v1,<base64 signature>. While you rotate the secret, two signatures arrive separated by a space. |
{ "id": "evt_6553f1a2b3c4d5e6f7a8b9f1", "type": "invoice.paid", "timestamp": "2026-11-15T14:03:22.000Z", "livemode": true, "data": { "object": { "id": "…" } }}The full shape of each type is in the Event catalog. If the body exceeds 64 kB,
data.object only carries its id and data.truncated: true: fetch the resource through the API.
Verify the signature
Section titled “Verify the signature”Verify every request before processing it: that’s how you know it comes from Inspow and nobody changed it. The signature covers the exact body you receive: read it raw and verify it before parsing it as JSON.
With the Standard Webhooks library
Section titled “With the Standard Webhooks library”Standard Webhooks has libraries for several languages (official list). In Node.js:
npm install standardwebhooksimport express from 'express';import { Webhook } from 'standardwebhooks';
const app = express();const wh = new Webhook(process.env.INSPOW_WEBHOOK_SECRET); // whsec_…
app.post('/webhooks/inspow', express.raw({ type: 'application/json' }), (req, res) => { let event; try { event = wh.verify(req.body, { 'webhook-id': req.header('webhook-id'), 'webhook-timestamp': req.header('webhook-timestamp'), 'webhook-signature': req.header('webhook-signature'), }); } catch { return res.status(400).send('Invalid signature'); } // Store event.id so you don't process it twice and answer now; heavy work goes to the background. res.sendStatus(204);});verify accepts the secret with its whsec_ prefix, checks the signature and rejects a
webhook-timestamp more than 5 minutes away from your clock. If everything is fine, it returns the
parsed event.
By hand
Section titled “By hand”If your language has no library:
- Take what follows
whsec_in your secret and base64-decode it: that is the key. - Build the signed content:
<webhook-id>.<webhook-timestamp>.<body>, with the body exactly as it arrived. - Compute HMAC-SHA256 with the key and encode the result in standard base64.
- Compare, in constant time, against each
v1,…signature inwebhook-signature. One match is enough. - Reject the event if
webhook-timestampis more than 5 minutes away from your current time.
import { createHmac, timingSafeEqual } from 'node:crypto';
export function validSignature({ secret, id, timestamp, body, signatureHeader }) { const now = Math.floor(Date.now() / 1000); if (Math.abs(now - Number(timestamp)) > 5 * 60) return false; const key = Buffer.from(secret.slice('whsec_'.length), 'base64'); const expected = Buffer.from( createHmac('sha256', key).update(`${id}.${timestamp}.${body}`).digest('base64') ); return signatureHeader.split(' ').some((signature) => { const [version, value] = signature.split(','); if (version !== 'v1' || !value) return false; const received = Buffer.from(value); return received.length === expected.length && timingSafeEqual(received, expected); });}Answer fast
Section titled “Answer fast”Answer with a 2xx code within 15 s. Any other code, a timeout or a connection error count as a
failure and are retried. If you need heavy work, store the event, answer and process it later.
Retries
Section titled “Retries”A failed delivery is retried, up to 8 attempts in total (about 27 hours):
| Attempt | Wait since the previous one |
|---|---|
| 1 | immediately |
| 2 | 5 s |
| 3 | 5 min |
| 4 | 30 min |
| 5 | 2 h |
| 6 | 5 h |
| 7 | 10 h |
| 8 | 10 h |
- Each wait varies by ±10 % so deliveries don’t all arrive at once.
- If you answer
429or503with aRetry-Afterheader (seconds or HTTP date), we wait what you ask, up to 10 h, when it is longer than the table’s wait. That attempt counts within the 8. - If you answer
410 Goneto an automatic delivery, the endpoint is disabled right away and not retried. - After the last attempt, the delivery is marked Failed. You can resend it by hand (below).
Deduplicate by webhook-id
Section titled “Deduplicate by webhook-id”Delivery is at least once: the same event can arrive more than once (a retry after a timeout, a
manual resend). Store the webhook-id of every event you process and ignore repeats.
Order isn’t guaranteed: an invoice.paid can arrive before its invoice.created. Use timestamp
to order them and, when in doubt, fetch the resource’s current state through the API.
Ignore event types you don’t know: we will add more.
Test event
Section titled “Test event”In the endpoint detail, click Send test event and pick a type. Inspow sends the catalog example
with livemode: false, in a single attempt, regardless of which events the endpoint has chosen.
Test events don’t appear in Events or in GET /events, and they don’t count toward disabling
the endpoint. The endpoint must be enabled.
Resend an event
Section titled “Resend an event”Expand a delivery’s attempts (in the endpoint detail, or in the Events tab) and click
Resend now. A new single-attempt delivery is created with the same webhook-id: if you already
processed it, your deduplication ignores it. It only works on enabled endpoints and with events that
are still stored.
Automatic disabling
Section titled “Automatic disabling”If an endpoint fails for 5 days in a row (since the first failure of an automatic delivery; a
successful automatic delivery resets the count, tests and resends don’t count), Inspow disables it
and lets you know. When an endpoint is disabled (by failures, by a 410 or by hand), its pending
deliveries are canceled and no new ones are created.
Enabling it again doesn’t resend what was lost: recover it with GET /events or with a manual
resend.
Rotate the secret
Section titled “Rotate the secret”In the endpoint detail, click Rotate. The previous secret keeps signing for another 24 h: during that time every request carries two signatures, one per secret, and the libraries accept either. Update the secret in your system within that window.
If the account is locked
Section titled “If the account is locked”While your Organization’s account is locked or suspended, each delivery is postponed by 1 h without using up attempts. Whatever can’t be delivered while the event is stored is discarded.
History
Section titled “History”In Developers → Webhooks, each endpoint’s detail shows its recent deliveries and, for each delivery, every attempt with its code, its duration and the time of the next one. Events and their deliveries are kept for 7 days.
Console permissions
Section titled “Console permissions”| Action | Permission |
|---|---|
| See endpoints, deliveries and events | read:webhook-endpoints |
| Add an endpoint | create:webhook-endpoints |
| Edit, enable or disable, see or rotate the secret, send tests and resend | update:webhook-endpoints |
| Delete an endpoint | delete:webhook-endpoints |