curl -X POST "https://api.affonso.io/v1/commissions/bonus" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"affiliate_id": "aff_789ghi",
"amount": 50,
"note": "Q3 partner bonus"
}'
{
"success": true,
"data": {
"id": "cm3earningabc123",
"affiliate_id": "aff_789ghi",
"amount": 50,
"currency": "USD",
"earning_type": "bonus",
"status": "ready_for_payment",
"incentive_type": "commission",
"hold_period_days": null,
"note": "Q3 partner bonus",
"created_at": "2024-01-20T15:30:00Z",
"updated_at": "2024-01-20T15:30:00Z"
}
}
Commissions
Create Bonus
Create a first-class Bonus earning for an affiliate without a sale or referral
POST
/
v1
/
commissions
/
bonus
curl -X POST "https://api.affonso.io/v1/commissions/bonus" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"affiliate_id": "aff_789ghi",
"amount": 50,
"note": "Q3 partner bonus"
}'
{
"success": true,
"data": {
"id": "cm3earningabc123",
"affiliate_id": "aff_789ghi",
"amount": 50,
"currency": "USD",
"earning_type": "bonus",
"status": "ready_for_payment",
"incentive_type": "commission",
"hold_period_days": null,
"note": "Q3 partner bonus",
"created_at": "2024-01-20T15:30:00Z",
"updated_at": "2024-01-20T15:30:00Z"
}
}
This endpoint creates a first-class Bonus earning with no sale and no referral. The earning is
bonus, ready_for_payment, and payout-eligible. Do not send referral_id or sale_amount. For sale commissions, use
POST /commissions
or
POST /conversions
instead.Body Parameters
The request body is strict. Extra properties are rejected.string
required
Affiliate to credit. Must belong to the authenticated team.
number
required
Bonus amount in the team’s currency. Must be between
0.0001 and 999999.9999 with at most 4 decimal places. Zero, negative, overflow, and extra-precision values are rejected.string
Optional note stored as the earning description. Maximum 2000 characters.
Response
The response includes the created Bonus earning.boolean
Always
true for successful responsesobject
The created Bonus earning.
Show Data Object Properties
Show Data Object Properties
string
Unique identifier for the Bonus earning
string
The affiliate ID who will receive this Bonus earning
number
The Bonus amount in the team’s currency
string
The team’s currency code (3 letters, e.g., USD, EUR)
string
Always
bonusstring
Always
ready_for_payment. The earning is approved and ready for payout in the next cycle.string
Always
commissioninteger | null
Number of days the earning is on hold before becoming available for payment. Can be
null.string | null
Optional note stored as the earning description. Can be
null.string
ISO 8601 timestamp of when the Bonus earning was created
string
ISO 8601 timestamp of when the Bonus earning was last updated
curl -X POST "https://api.affonso.io/v1/commissions/bonus" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"affiliate_id": "aff_789ghi",
"amount": 50,
"note": "Q3 partner bonus"
}'
{
"success": true,
"data": {
"id": "cm3earningabc123",
"affiliate_id": "aff_789ghi",
"amount": 50,
"currency": "USD",
"earning_type": "bonus",
"status": "ready_for_payment",
"incentive_type": "commission",
"hold_period_days": null,
"note": "Q3 partner bonus",
"created_at": "2024-01-20T15:30:00Z",
"updated_at": "2024-01-20T15:30:00Z"
}
}
Was this page helpful?
