Skip to content

Outgoing webhooks, version 1

Normative format of the webhooks the platform sends to vendor systems (#45, format fixed in #210). It follows the open Standard Webhooks specification, so vendors can use any library for it as well as the helper in the Node backend SDK. Test vectors: webhooks-v1.vectors.json, generated and checked by scripts/webhook_vectors.py.

The key words MUST, MUST NOT, SHOULD and MAY are used as in RFC 2119.

1. Request

Each delivery is an HTTPS POST to the endpoint's URL with a JSON body (section 4) and these headers:

Header Value
content-type application/json
webhook-id The event ID (evt_...). Stays the same on every retry of the same event to the same endpoint
webhook-timestamp Time of this attempt, Unix seconds as a decimal integer
webhook-signature One or more signatures, separated by single spaces (section 2)

The body is UTF-8 JSON without a byte order mark. Receivers MUST verify the signature over the body exactly as received, before parsing or re-serializing it.

2. Signature

  • Secret: each endpoint has a secret of the form whsec_ followed by the standard Base64 encoding (with padding) of 32 random bytes. The HMAC key is the decoded bytes, not the string. Verifiers MUST accept keys of 24 to 64 bytes.
  • Signed content: the bytes of <webhook-id>.<webhook-timestamp>.<body>, the three parts joined by . (0x2E).
  • Signature: v1, followed by the standard Base64 encoding (with padding) of HMAC-SHA256(key, signed content).
  • Several signatures: while a secret is being replaced, the sender signs with the old and the new secret and sends both, for example v1,<old> v1,<new>. Entries with a version other than v1 MUST be ignored.

A receiver accepts a request when all of these hold:

  1. The three headers webhook-id, webhook-timestamp and webhook-signature are present and not empty.
  2. webhook-timestamp is a decimal integer and at most 300 seconds away from the receiver's clock, in either direction. This bounds replays.
  3. At least one v1 entry equals the signature computed with one of the receiver's secrets. The comparison MUST take constant time.
  4. The body is a JSON object whose id equals webhook-id.

Otherwise the receiver rejects the request, typically with HTTP 400 or 401, and does not act on it.

3. Secret rotation

Rotating an endpoint's secret creates a new secret at once. For the next 24 hours every delivery carries signatures with both secrets, so the receiver can switch whenever it likes; afterwards only the new secret signs. A receiver can hold both secrets in that time (the Node helper takes a list).

4. Body

{
  "version": 1,
  "id": "evt_0K3N8Q2W9E4R7T1Y5U6I0O3P8A",
  "type": "license.created",
  "occurred_at": "2026-11-25T21:00:00.123456Z",
  "environment": "live",
  "subject_id": "lic_0K3N8Q2W9E4R7T1Y5U6I0O3P8B",
  "actor": { "kind": "api_key", "id": "key_0K3N8Q2W9E4R7T1Y5U6I0O3P8C" },
  "data": { "plan_id": "plan_0K3N8Q2W9E4R7T1Y5U6I0O3P8D" }
}
Field Meaning
version Format version of the body, 1. A new major format gets a new number and is announced in advance
id, type, occurred_at, environment, subject_id, actor, data The event as the audit log (GET /v1/events) shows it, from the same source. occurred_at is RFC 3339 in UTC

The body never contains secrets, license keys or IP addresses. Receivers MUST ignore fields they do not know; new fields and new event types can appear without a new version.

Event types for version 1: license.created, license.activated, license.expired, license.suspended, license.revoked, activation.created, activation.reset, order.paid, order.refunded, cancellation.received, product.min_version_raised, release.published, release.blocked, release.rollout_changed, release.withdrawn, withdrawal.received, newsletter.subscribed, newsletter.unsubscribed, crash_group.created, crash_group.regressed. crash_group.created comes for the first report of a new crash group and carries product_id, kind, title and version; crash_group.regressed when a report from a higher version reopened a resolved group, with product_id, resolved_version and version. Neither carries message, log or contact. newsletter.subscribed comes when a subscriber confirmed with the link (double opt-in), newsletter.unsubscribed when a subscription ended; both carry customer_id, source and locale (the latter also by, subscriber or vendor), never the address. cancellation.received and withdrawal.received come for every declaration on your cancellation or withdrawal page; they carry order_id, customer_id and locale (a cancellation also kind, status and open_reason), never name, contract or address. release.rollout_changed carries reason rollbacks when the server paused the rollout itself because of too many rollbacks. product.min_version_raised comes when the server raised min_app_version itself (product setting min_version_after_days), with the new and the previous minimum. An endpoint receives only the types it subscribed to.

5. Delivery

  • Success: any HTTP status from 200 to 299 within 15 seconds. Redirects are not followed and count as failure.
  • Retries: after a failure the sender tries again after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours, about 28 hours in all. Each attempt has a fresh webhook-timestamp and signature. After the last attempt the delivery is marked failed; the dashboard and the Management API show every attempt and can send it again.
  • At least once: the same event can arrive more than once. Receivers SHOULD remember processed webhook-id values and skip repeats.
  • Order: deliveries can arrive out of order. Use occurred_at, or fetch the current state through the Management API.
  • Targets: endpoint URLs MUST use https. The sender refuses targets in private, loopback, link-local and other non-public address ranges, checked after DNS resolution and again on every attempt. For local development use a tunnel with a public address.
  • Test and live: endpoints belong to one environment and receive only its events.

6. Discord

An endpoint created with "format": "discord" (#614) is the webhook URL of a Discord channel, https://discord.com/api/webhooks/{id}/{token} (also discordapp.com, ptb.discord.com and canary.discord.com); other URLs are refused. Sections 1 to 4 do not apply to it: the sender posts a Discord message without the webhook-* headers and without signature, since Discord checks none, and the endpoint has no secret.

{
  "content": "**license.created** in live\nSubject: `lic_0K3N8Q2W9E4R7T1Y5U6I0O3P8B`\nBy: api_key `key_0K3N8Q2W9E4R7T1Y5U6I0O3P8C`\nAt: 2026-11-25T21:00:00.123456Z (`evt_0K3N8Q2W9E4R7T1Y5U6I0O3P8A`)",
  "allowed_mentions": { "parse": [] }
}

The message carries event type, environment, subject, actor and time with the event ID, never data, which can hold personal data. Mentions are switched off. Section 5 applies as for every endpoint; Discord's rate limit (HTTP 429) counts as a failure and is retried.