Webhooks
Receive real-time event notifications
Last updated: 2026-01-19
Webhooks notify your application when events happen in Spark!. Receive real-time updates about new orders, affiliate signups, payouts, and more.
Setting Up Webhooks
- Navigate to Settings → API → Webhooks
- Click "Add Webhook Endpoint"
- Enter your endpoint URL (HTTPS required)
- Select events to subscribe to
- Copy the signing secret for verification
Available Events
- affiliate.created — New affiliate signed up
- affiliate.approved — Affiliate was approved
- affiliate.updated — Affiliate profile changed
- order.attributed — Order attributed to affiliate
- commission.created — Commission calculated
- commission.approved — Commission confirmed
- commission.paid — Commission paid out
- payout.created — Payout batch created
- payout.completed — Payout batch processed
- click.recorded — Affiliate link clicked
Payload Format
Webhook payloads are JSON objects with:
id— Unique event IDtype— Event type (e.g., "order.attributed")created_at— ISO 8601 timestampdata— Event-specific data object
Idempotency
Use the id field to deduplicate events. In rare cases, the same event may be delivered multiple times.
Verifying Webhooks
Verify webhook signatures to ensure authenticity:
- Extract the
X-Spark-Signatureheader - Compute HMAC-SHA256 of the raw body using your signing secret
- Compare computed signature with header value
- Reject requests that don't match
Retry Policy
If your endpoint fails (non-2xx response), Spark! retries:
- Immediate retry
- After 5 minutes
- After 30 minutes
- After 2 hours
- After 24 hours
After 5 failed attempts, the webhook is marked as failed.
Testing Webhooks
Test your webhook endpoint:
- Use the "Send Test Event" button in settings
- View webhook delivery logs
- Retry failed deliveries manually
Next Steps
Related Articles
Was this page helpful?
Need more help? Contact support