DEPEG_TIER_CHANGE events and verifies them. For the full API and event reference, see Webhooks.
What you’ll build
A small HTTP server that:- Receives webhook POSTs from Webacy,
- Verifies the
X-Webhook-Signature(so you only trust real events), - Reacts to the tier change.
Get your API key
You use your standard Webacy API key (
x-api-key). If you don’t have one, contact info@webacy.com. No webhook-specific setup is needed.Build a receiver that verifies signatures
Each delivery is signed with HMAC-SHA256 over the JSON-serialized Deploy this to a public HTTPS URL (private/loopback hosts are rejected). For local testing, a tunnel like ngrok or a webhook.site bin works.
event object, keyed by your subscription’s secret_key, and sent in the X-Webhook-Signature header. Always verify before trusting a payload.Create a subscription
Point a subscription at your URL and pick filters. Save the Response (note Set
secret_key from the response — it’s only returned once.id and secret_key):WEBACY_WEBHOOK_SECRET in your receiver to that secret_key.Send a test event
Trigger a synthetic delivery so you don’t have to wait for a real tier change:Your endpoint should receive a
DEPEG_TIER_CHANGE POST and log it. If the signature check passes, you’re done — that’s the same path real events take.Go live
- Filters: tune
tiers,chains,tokens,minDeviationPctto only get the alerts you care about. - Retries: failed deliveries retry up to 5 times with backoff. Inspect history with
GET /webhooks/deliveriesand re-send withPOST /webhooks/deliveries/{id}/retry. - Secret rotation: rotate with
POST /webhooks/subscriptions/{id}/rotate-secret. The previous secret stays valid for 24h (sent asX-Webhook-Previous-Signature) so you can roll without downtime. - Billing: 1 CU per management call and 1 CU per delivery.
The event you receive
X-Event-Type: DEPEG_TIER_CHANGE, X-Webhook-Signature, X-Event-ID (use for idempotency).
