Skip to main content
PUT
/
v1
/
commissions
/
{id}
curl -X PUT "https://api.affonso.io/v1/commissions/com_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "paid"
  }'
{
  "success": true,
  "data": {
    "id": "com_abc123",
    "referral_id": "ref_456def",
    "affiliate_id": "aff_789ghi",
    "program_id": "prog_123xyz",
    "sale_amount": 99.00,
    "sale_amount_currency": "USD",
    "commission_amount": 9.90,
    "commission_currency": "USD",
    "status": "paid",
    "sales_status": "complete",
    "hold_period_days": null,
    "payment_intent_id": null,
    "invoice_id": null,
    "created_at": "2024-01-20T15:30:00Z",
    "updated_at": "2024-01-20T16:45:00Z"
  }
}

Path Parameters

id
string
required
The unique identifier of the commission to update

Body Parameters

All body parameters are optional. Only include the fields you want to update.
status
string
Update the commission status. Valid values: pending, pending_manual_approval, ready_for_payment, paid, declined. Status changes may trigger webhook events (transaction.approved, transaction.rejected, transaction.paid).
sales_status
string
Status of the customer’s purchase. Valid values: open, complete, trialing, failed, refunded, partial_refunded.
hold_period_days
integer
Number of days to hold commission before it’s ready for payment. Must be a non-negative integer.

Response

success
boolean
Always true for successful responses
data
object
The updated commission object.
curl -X PUT "https://api.affonso.io/v1/commissions/com_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "paid"
  }'
{
  "success": true,
  "data": {
    "id": "com_abc123",
    "referral_id": "ref_456def",
    "affiliate_id": "aff_789ghi",
    "program_id": "prog_123xyz",
    "sale_amount": 99.00,
    "sale_amount_currency": "USD",
    "commission_amount": 9.90,
    "commission_currency": "USD",
    "status": "paid",
    "sales_status": "complete",
    "hold_period_days": null,
    "payment_intent_id": null,
    "invoice_id": null,
    "created_at": "2024-01-20T15:30:00Z",
    "updated_at": "2024-01-20T16:45:00Z"
  }
}