Path Parameters
The unique identifier of the commission to update
Body Parameters
All body parameters are optional. Only include the fields you want to update.
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).
Status of the customer’s purchase. Valid values: open, complete, trialing, failed, refunded, partial_refunded.
Number of days to hold commission before it’s ready for payment. Must be a non-negative integer.
Update the sale/transaction amount. Must be a positive number.
Update the currency code for the sale amount. Must be a 3-letter currency code (e.g., USD, EUR).
Update the commission amount to be paid. Must be a non-negative number.
Update the currency code for the commission. Must be a 3-letter currency code (e.g., USD, EUR).
Response
Always true for successful responses
The updated commission object.Show Data Object Properties
Unique identifier for the commission
The referral ID this commission is associated with
The affiliate ID who will receive this commission
The total sale/transaction amount
The currency code for the sale (3 letters)
The commission amount to be paid
The currency code for the commission
Commission status: pending, pending_manual_approval, ready_for_payment, paid, declined
Sales status: open, complete, trialing, failed, refunded, partial_refunded
Number of days commission is on hold
Payment intent ID if provided
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update
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"
}
}