Sprusify
Get started

Webhooks & API

Sprusify integrations are built around event delivery and API data access for reporting and automation.

Common Webhook Events

  • click.created: referral click was recorded.
  • conversion.created: order attribution was created.
  • conversion.updated: conversion status or amount changed.
  • payout.sent: payout completed.
  • dispute.updated: dispute state changed.

Webhook Security Requirements

  • Verify request signatures before processing.
  • Reject invalid signatures with clear logging.
  • Process events idempotently to handle retries safely.

API Patterns

  • Reporting pull: fetch clicks, conversions, and payouts by date range.
  • Configuration push: manage campaign mappings and discount relationships.
  • Backfill jobs: hydrate external BI or finance systems from historical exports.

Example Webhook Payload

{
	"event": "conversion.created",
	"id": "evt_123",
	"occurred_at": "2026-04-14T10:22:00Z",
	"data": {
		"order_id": "ord_456",
		"affiliate_id": "aff_789",
		"gross_amount": 149.99,
		"commission_amount": 14.99
	}
}

Reliability Checklist

  1. Return HTTP 200 quickly after accepting payload.
  2. Queue heavy work outside the request thread.
  3. Retry transient failures with exponential backoff.
  4. Alert on repeated delivery failures.

Troubleshooting

  • Signature mismatch: confirm shared secret and header parsing.
  • Duplicate records: verify idempotency key strategy.
  • Missing events: inspect webhook logs and replay failed deliveries.