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": "ready_for_payment",
    "sale_amount": 149.00,
    "sale_amount_currency": "USD",
    "commission_amount": 14.90,
    "commission_currency": "USD"
  }'
{
  "success": true,
  "data": {
    "id": "com_abc123",
    "referral_id": "ref_456def",
    "affiliate_id": "aff_789ghi",
    "program_id": "prog_123xyz",
    "sale_amount": 149.00,
    "sale_amount_currency": "USD",
    "commission_amount": 14.90,
    "commission_currency": "USD",
    "status": "ready_for_payment",
    "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.
sale_amount
number
Update the sale/transaction amount. Must be a positive number.
sale_amount_currency
string
Update the currency code for the sale amount. Must be a 3-letter currency code (e.g., USD, EUR).
commission_amount
number
Update the commission amount to be paid. Must be a non-negative number.
commission_currency
string
Update the currency code for the commission. Must be a 3-letter currency code (e.g., USD, EUR).

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": "ready_for_payment",
    "sale_amount": 149.00,
    "sale_amount_currency": "USD",
    "commission_amount": 14.90,
    "commission_currency": "USD"
  }'
{
  "success": true,
  "data": {
    "id": "com_abc123",
    "referral_id": "ref_456def",
    "affiliate_id": "aff_789ghi",
    "program_id": "prog_123xyz",
    "sale_amount": 149.00,
    "sale_amount_currency": "USD",
    "commission_amount": 14.90,
    "commission_currency": "USD",
    "status": "ready_for_payment",
    "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"
  }
}