PATCH
/api/v1/payouts/:idPerform an action on a payout. Use this to approve pending payouts, reject them (releasing commissions back to approved), or confirm that payment has been sent.
Marking a payout as paid triggers the payout.completed webhook event if configured.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired | string | The payout ID. |
Request body
| Parameter | Type | Description |
|---|---|---|
actionrequired | string | Action to perform: approve, reject, or mark_paid. |
reference | string | Payment reference (e.g. bank transfer ID). Only used with mark_paid. |
Example requests
Approve a payout
bash
curl -X PATCH https://anderro.com/api/v1/payouts/pay_abc123 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_your_secret_key" \
-d '{ "action": "approve" }'
Mark as paid
bash
curl -X PATCH https://anderro.com/api/v1/payouts/pay_abc123 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_your_secret_key" \
-d '{
"action": "mark_paid",
"reference": "tr_1234567890"
}'
Responses
200Payout action successful
json
{
"data": {
"id": "pay_abc123",
"status": "completed",
"amount_cents": 24500,
"paid_at": "2026-04-10T15:30:00.000Z"
}
}
400Invalid action or payout state
json
{
"error": "Payout must be in approved state to mark as paid"
}
404Payout not found
json
{
"error": "Payout not found"
}
Action prerequisites
- approve: Payout must be in
pendingorfailedstate. - reject: Payout must be in
pendingstate. Rejecting releases all linked commissions back toapprovedstatus. - mark_paid: Payout must be in
approvedstate. All linked commissions are moved topaidstatus.