Affiliate Revenue API
Read payments, commissions, payouts and program totals from the API.
The money side of the affiliate program: what came in, what partners earned, and what has been paid out. All amounts are in minor units (cents).
Payments
GET /api/v1/affiliate/payments| Parameter | Type | Description |
|---|---|---|
affiliateId | string | Only payments attributed to this partner. |
cursor | string | Cursor from the previous page. |
limit | number | Rows per page, 1-200 (default 100). |
{
"payments": [
{
"id": "q44...",
"customerKey": "cus_123",
"customerEmail": "[email protected]",
"amount": 4900,
"refundedAmount": 0,
"netAmount": 4900,
"currency": "eur",
"paymentType": "subscription",
"source": "webhook",
"affiliateId": "n97...",
"affiliateName": "Marie Dupont",
"occurredAt": 1785312000000
}
],
"cursor": "eyJ..."
}One row per payment, dated by when the money actually moved, so subscription renewals appear on their own date. cursor is null on the last page.
Payments summary
GET /api/v1/affiliate/payments/summaryRolling four-week totals computed server-side over the whole window:
{
"summary": {
"count": 128,
"amount": 627300,
"subscriptions": 96,
"currency": "eur",
"partial": false,
"latestOccurredAt": 1785312000000,
"latestCustomerEmail": "[email protected]",
"windowDays": 28
}
}partial: true means the window was clipped at 1000 payments, so the figures are a floor.
Commissions
GET /api/v1/affiliate/commissions| Parameter | Type | Description |
|---|---|---|
status | string | pending, approved, processing, paid or void. |
affiliateId | string | Only this partner's commissions. |
limit | number | Rows to return, 1-200 (default 100). |
Approve a pending commission so it becomes payable:
POST /api/v1/affiliate/commissions/:commissionId/approvecurl -X POST -H "x-api-key: org_api_key" \
"https://growth.example.com/api/v1/affiliate/commissions/c88.../approve"