Skip to main content
Webhooks push events to your own endpoint in real time — no polling. Subscribe to the events you care about and TrackRev sends each one as a signed JSON POST.

Create a webhook

1

Open Integrations → Webhooks

Go to Configuration → Integrations → “4 · Webhooks”.
2

Add your endpoint

Enter an https:// URL (HTTP is rejected) and select the events to subscribe to.
3

Save your signing secret

TrackRev shows the endpoint’s signing secret (whsec_…) once — store it to verify signatures.

Payload

Every delivery is a POST with this envelope:
Headers on every request:

Verify the signature

Compute HMAC-SHA256(rawBody, signingSecret) and compare (constant-time) to X-TrackRev-Signature:
Verify against the raw request body, exactly as received — not a re-serialised object — or the signature won’t match.

Events

Event fields

  • click.created — click_id is the click’s id (the id in GET /api/v1/clicks), ts its timestamp, visitor_id the visitor who clicked, and external_id the link’s own external_id (null if it has none). For a Smart Link, channel is the channel inferred for this click.
  • sale.created — when the sale was attributed to a click, link_id and channel name the credited link (with split credit, the most recent click) and visitor_id the buyer’s visitor; all three are null for a sale with no click credit (e.g. coupon-only).
click.created

Delivery behaviour

  • Each event is delivered to every active webhook subscribed to it.
  • Each attempt times out after 5 seconds. A delivery that fails with a network error, a timeout, 429 or a 5xx is retried — up to 3 attempts, 0.5 s and then 2 s apart, all within about 10 seconds. Other responses (2xx, 3xx, 4xx) are final.
  • Retries send the identical body and headers (same X-TrackRev-Timestamp and signatures), so you can de-duplicate on the body — e.g. click_id for clicks, order_id for sales.
  • Delivery is best-effort — TrackRev records the final attempt’s status but does not block your product on your endpoint. Credit deliveries made by the fulfilment worker are attempted once.
  • Return a 2xx quickly; do heavy work asynchronously on your side.
Manage webhooks (add, disable, delete) from the same Integrations section. Each row shows its last delivery status and time.