Envelope Format
Every event is wrapped in the same envelope:| Field | Type | Description |
|---|---|---|
id | string | Unique message ID (use for idempotency) |
type | string | Event type (see below) |
schemaVersion | 2 | Always 2 |
createdAt | string | ISO 8601 timestamp |
merchantId | string | Your merchant ID |
programId | string? | Program ID (if event is program-scoped) |
environment | string | production, preview, or development |
data | object | Event-specific payload |
Program Events
program.created
program.created
Fired when a new affiliate program is created.
program.updated
program.updated
Fired when program settings are changed (name, commission, cookie duration, etc.).
Affiliate Events
affiliate.joined
affiliate.joined
Fired when an affiliate joins your program (via invite link or marketplace).
affiliate.approved
affiliate.approved
Fired when a pending affiliate is approved.
affiliate.blocked
affiliate.blocked
Fired when an affiliate is blocked (manually or by fraud detection).
affiliate.unblocked
affiliate.unblocked
Fired when a previously blocked affiliate is reinstated.
Conversion Events
conversion.created
conversion.created
Fired when a new conversion is recorded (from Stripe or manually via API).
conversion.refunded
conversion.refunded
Fired when a conversion is refunded (triggered by Stripe refund or manual action).
Payout Events
payout.created
payout.created
Fired when a payout is created for an affiliate.
payout.processing
payout.processing
Fired when a payout moves into the manual processing step after the merchant starts the external payment.
payout.completed
payout.completed
Fired when a payout is marked completed after the external payment succeeds.
payout.failed
payout.failed
Fired when a manual payout attempt fails and the payout is marked for retry or follow-up.
Fraud Events
flag.resolved
flag.resolved
Fired when a fraud flag is resolved (approved or rejected).
Quick Reference
| Event | Category | When |
|---|---|---|
program.created | Program | New program created |
program.updated | Program | Program settings changed |
affiliate.joined | Affiliate | Affiliate joins program |
affiliate.approved | Affiliate | Affiliate approved |
affiliate.blocked | Affiliate | Affiliate blocked |
affiliate.unblocked | Affiliate | Affiliate reinstated |
conversion.created | Conversion | New conversion recorded |
conversion.refunded | Conversion | Conversion refunded |
payout.created | Payout | Payout created |
payout.processing | Payout | Payout processing started |
payout.completed | Payout | Payout marked completed |
payout.failed | Payout | Payout failed |
flag.resolved | Fraud | Fraud flag resolved |