Outgoing webhooks

Receive signed notifications (campaigns, future alerts) on your HTTPS endpoint.

Configuration (JWT)

  • GET /settings/webhook — read config
  • PATCH /settings/webhook — set global tenant URL
  • POST /settings/webhook/secret — generate secret (shown once)
  • GET /settings/webhook/deliveries — delivery history

HMAC verification

Canonical JSON body (sort_keys=True). Headers: X-ZedCheckout-Signature (sha256=…), X-ZedCheckout-Timestamp.

import hmac
import hashlib

def verify(body: bytes, signature_header: str, secret: str) -> bool:
    expected = "sha256=" + hmac.new(
        secret.encode("utf-8"), body, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(signature_header.strip(), expected)

Event types

Implemented

  • retention.campaign.sent — Retention campaign send (webhook channel) (URL set on the campaign (webhook_url))
  • customer.churn_score.changed — Churn score updated after recalculation or new events
  • customer.high_risk.detected — Customer enters high or critical risk band

Campaign payload example: — retention.campaign.sent

{
  "event": "retention.campaign.sent",
  "campaign_id": "uuid",
  "campaign_name": "Win-back",
  "customer_external_ids": ["cust_1"],
  "recipients_count": 1
}

Campaign payload example: — customer.churn_score.changed

{
  "event": "customer.churn_score.changed",
  "customer_id": "cust_1",
  "previous_score": 0.42,
  "new_score": 0.68,
  "previous_label": "medium",
  "new_label": "high",
  "model_version": "rule_v1"
}

Campaign payload example: — customer.high_risk.detected

{
  "event": "customer.high_risk.detected",
  "customer_id": "cust_1",
  "score": 0.72,
  "label": "high",
  "model_version": "rule_v1"
}

Roadmap

  • notification.slack.message_requested

Shopify webhooks (OAuth connection): Shopify webhooks.

Delivery & retry

  • 8 attempts max, exponential backoff (1 h cap)
  • Statuses: pending, success, failed, dead_letter
  • HTTP timeout: 15 s

Details: docs/integrations/outbound-webhooks.md in the monorepo.