Webhooks
Settings → Webhooks manages outbound webhook subscriptions so your systems receive PeakCommerce events in real time instead of polling the API.
Why it matters
Webhooks let you react to commerce activity the moment it happens — a new subscription, a completed order, a payment — by pushing a signed JSON payload to an endpoint you control.
Tabs
Subscriptions — register an endpoint with Add Webhook: a public HTTPS endpoint URL and the events it should receive. Subscribe to specific event types, or use
*to receive all of them. Each subscription's actions menu lets you Pause, Resume, Reveal signing secret, Rotate signing secret, or Delete it.Delivery Log — review recent deliveries with their status, HTTP response code, and attempt history to troubleshoot a failing endpoint.
Delivery format
Each delivery is an HTTP POST with a JSON body:
{ "event": "<event type>", "timestamp": "<ISO 8601>", "tenantId": "<your tenant>", "data": { } }Headers sent with every request:
X-Webhook-Signature
One or more comma-separated sha256=<hmac> values — HMAC-SHA256 of the raw request body, one per active signing secret
X-Webhook-Event
the event type name
X-Webhook-Timestamp
ISO 8601 timestamp of the event
Verification and security
Verify the signature. Compute
HMAC-SHA256(secret, rawBody)over the unparsed body and hex-encode it. SplitX-Webhook-Signatureon commas and accept the delivery if any entry equalssha256=<your digest>, using a constant-time comparison.Always split on commas, even if you never rotate. While a rotation is in progress the header carries a signature under each active secret. A verifier that compares the whole header against one digest rejects every delivery until the overlap ends.
Keep the signing secret safe. It is shown when you create the subscription, and you can show it again with Reveal signing secret from the subscription's actions menu.
Use a public HTTPS endpoint. When you add or edit a subscription, the URL must use
https://; anhttp://address, a loopback address, or a private network address is refused with the reason. Return a2xxquickly to acknowledge receipt.
Rotating the signing secret
Choose Rotate signing secret from the subscription's actions menu. The new secret signs deliveries straight away, and the previous secret keeps being signed alongside it for 24 hours. Deploy the new secret to your endpoint any time inside that window — because your verifier accepts any matching entry, no delivery is dropped. After the window closes, only the new secret is used.
Retries and dead-lettering
Failed deliveries are retried with exponential backoff (2^attempt seconds) for up to 5 attempts. After the fifth failure the delivery is marked dead_letter — visible in the Delivery Log for diagnosis and replay.
For the full event-type catalog, payload schemas, and replay endpoints, see the Webhooks reference in the Developers space. Related: API Keys.
Last updated
Was this helpful?
