Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.affonso.io/llms.txt

Use this file to discover all available pages before exploring further.

Payout events track the payment lifecycle for affiliate commissions.

Events

EventDescription
payout.createdNew payout is created for an affiliate
payout.updatedPayout is modified (universal event)
payout.paidPayout is marked as completed
payout.failedPayout fails
payout.deletedPayout is deleted

Payout Status Values

StatusDescription
PENDINGPayout created, awaiting processing
PROCESSINGPayout is being processed
COMPLETEDPayout successfully completed
FAILEDPayout failed

Payload

id
string
Unique event identifier
type
string
Event type (e.g., payout.paid)
createdAt
string
ISO 8601 timestamp of when the event occurred
data
object
Event payload data.

Example Payloads

payout.created
{
  "id": "evt_abc123",
  "type": "payout.created",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "data": {
    "payoutId": "pay_xyz789",
    "affiliateId": "aff_abc123",
    "affiliateProgramId": "prog_def456",
    "invoiceNumber": 1042,
    "amount": 250.00,
    "status": "PENDING",
    "isManagedPayout": false,
    "paidAt": null,
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z"
  }
}
payout.paid
{
  "id": "evt_abc123",
  "type": "payout.paid",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "data": {
    "payoutId": "pay_xyz789",
    "affiliateId": "aff_abc123",
    "affiliateProgramId": "prog_def456",
    "invoiceNumber": 1042,
    "amount": 250.00,
    "status": "COMPLETED",
    "isManagedPayout": true,
    "paidAt": "2024-01-15T14:00:00.000Z",
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T14:00:00.000Z"
  }
}
payout.failed
{
  "id": "evt_abc123",
  "type": "payout.failed",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "data": {
    "payoutId": "pay_xyz789",
    "affiliateId": "aff_abc123",
    "affiliateProgramId": "prog_def456",
    "invoiceNumber": 1042,
    "amount": 250.00,
    "status": "FAILED",
    "isManagedPayout": true,
    "paidAt": null,
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T14:00:00.000Z"
  }
}