Events
Setup
Create webhook endpoints from the dashboard under Settings > Webhooks.- Enter your endpoint URL (must be HTTPS)
- Select which events to subscribe to
- Save — Grantiva generates a signing secret (
whsec_...)
Payload format
Verifying signatures
Every webhook request includes anX-Grantiva-Signature header containing an HMAC-SHA256 signature of the request body, signed with your endpoint’s secret.
Subscription events
subscription.changed fires whenever a subscription entitlement materially changes (tier, status, interval, expiry, auto-renew, or product); identical redeliveries from Apple/Stripe do not re-fire it. subscription.expired additionally fires when status becomes expired or revoked, and subscription.refunded on refunds.
- Dedupe on
data.event_idand key any cache eviction bydata.subject_id. expires_atis ISO-8601 here but epoch seconds in the JWT claim — each surface follows its own convention.- Treat the webhook as a cache-bust nudge: re-read the claim from the next JWT rather than trusting the webhook body as authoritative.
Retries
Failed deliveries (non-2xx response or timeout) are retried up to 3 times with exponential backoff. You can view delivery history and response details in the dashboard.Testing
Send a test event from the webhook detail page in the dashboard (orPOST /api/v1/org/webhooks/:id/test). This synchronously delivers a synthetic attestation.completed payload — signed like a real event — and reports the HTTP status your endpoint returned, so you can verify reachability and signature handling.