API reference
Payouts
Preview and disburse matured commission.
Preview pending payouts
/v1/programs/:programId/payouts/pendingread scopeShows what a dispatch would send, grouped by affiliate — plus everyone who is blocked and why.
Path parameters
| programIdrequuid | From `GET /v1/me`. |
Response
{
"payable": [
{ "affiliateId": "c41a...", "name": "Kristin Richards", "commissionCents": 184200, "owedBackCents": 2725, "payCents": 181475, "conversionCount": 37 }
],
"blocked": [
{ "affiliateId": "b12f...", "name": "Sam Doe", "commissionCents": 2400, "blockedReason": "below_minimum_payout" }
],
"totalPayableCents": 181475,
"minimumPayoutCents": 5000,
"payoutProvider": "stripe_connect"
}- `blockedReason` is one of `affiliate_not_active`, `missing_tax_info`, `payout_account_not_connected`, `owes_more_than_earned`, `below_minimum_payout`.
- `commissionCents` is what the affiliate earned; `owedBackCents` is commission already paid on sales that were since refunded or disputed, taken off this payout; `payCents` is what is paid. When an affiliate owes at least what they earned, nothing is paid (`owes_more_than_earned`) and the amount stays open for the next payout.
- Only conversions past their holding period are counted.
Dispatch a payout batch
/v1/programs/:programId/payouts/dispatch-batchwrite scopePays every eligible affiliate through the program's configured payout provider.
Path parameters
| programIdrequuid | From `GET /v1/me`. |
Response
{
"batchId": "e77c...",
"succeededCount": 12,
"failedCount": 0,
"skippedCount": 3,
"totalAmountCents": 942100
}- **This moves real money and is not request-idempotent.** Paid conversions flip to `paid` and are excluded from the next batch, so a retry pays only what genuinely didn't go out — but two concurrent calls can create two batches.
- Preview with `payouts/pending` first.
- Returns `422` when there is nothing to pay. That is a valid state, not a failure — don't alert on it.
- While payouts are manual, a dispatch creates a batch with `processing` line items; no money moves until you send it and call `mark-paid`.
List payout batches
/v1/programs/:programId/payouts/batchesread scopeThe program's payout batches, newest first. Optional `status` and `limit` (max 200) query parameters.
Path parameters
| programIdrequuid | From `GET /v1/me`. |
Response
{
"batches": [
{ "id": "e77c...", "total_amount_cents": 942100, "affiliate_count": 12, "payout_provider": "manual_csv", "status": "processing", "created_at": "2026-11-13T10:00:00Z", "completed_at": null }
]
}Get a payout batch
/v1/programs/:programId/payouts/batches/:batchIdread scopeOne batch with its per-affiliate line items, including transfer reference and paid date.
Path parameters
| programIdrequuid | From `GET /v1/me`. |
| batchIdrequuid | From the batch list. |
Response
{
"id": "e77c...",
"status": "processing",
"total_amount_cents": 942100,
"line_items": [
{ "id": "a91d...", "affiliate_id": "c41a...", "amount_cents": 184200, "currency": "USD", "status": "processing", "provider_transfer_reference": null, "paid_at": null }
]
}Mark a manual payout as paid
/v1/programs/:programId/payouts/line-items/:lineItemId/mark-paidwrite scopeRecords that a manual payout was sent. The line item becomes `completed`, its conversions `paid`, and the affiliate is notified.
Path parameters
| programIdrequuid | From `GET /v1/me`. |
| lineItemIdrequuid | From the batch detail. |
Response
{ "id": "a91d...", "status": "completed", "reference": "WIRE-2026-11-13-0042" }- Body: `{ "reference": "...", "paid_at": "2026-11-13T10:00:00Z" }` (`paid_at` optional ISO time).
- Retry-safe: the same `reference` for an already completed item returns `200` and changes nothing; another state returns `409`.
Commission balances
/v1/programs/:programId/payouts/balanceread scopeCommission totals in cents by status (pending, approved, paid, ...), overall and per affiliate. `owed_back_cents` is commission that was already paid and then reversed by a refund or dispute; it is taken off the affiliate's next payout.
Path parameters
| programIdrequuid | From `GET /v1/me`. |
Response
{
"currency": "USD",
"totals_cents": { "approved": 184200, "paid": 500000 },
"owed_back_cents": 2725,
"affiliates": [ { "affiliate_id": "c41a...", "by_status_cents": { "approved": 184200 }, "owed_back_cents": 2725 } ]
}