Skip to main content
GET
/
v1
/
commissions
curl -X GET "https://api.affonso.io/v1/commissions?limit=10&status=ready_for_payment&sales_status=complete" \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "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": "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-20T15:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 50,
    "total_pages": 5,
    "has_next_page": true,
    "has_prev_page": false
  }
}

Query Parameters

page
integer
default:"1"
Page number for pagination. Must be a positive integer.
limit
integer
default:"50"
Number of results per page. Maximum value is 200. Default is 50.
affiliate_id
string
Filter commissions by affiliate ID. Only returns commissions for the specified affiliate.
referral_id
string
Filter commissions by referral ID. Only returns commissions for the specified referral.
status
string
Filter commissions by commission status. Valid values: pending, pending_manual_approval, ready_for_payment, paid, declined.
sales_status
string
Filter commissions by sales/transaction status. Valid values: open, complete, trialing, failed, refunded, partial_refunded.
expand
string
Comma-separated list of related data to include. Valid values: affiliate, affiliate_program, referral. You can combine multiple values: affiliate,referral.
created_gte
string
Filter commissions created on or after this date. ISO 8601 date-time format (e.g., 2024-01-01T00:00:00Z).
created_lte
string
Filter commissions created on or before this date. ISO 8601 date-time format (e.g., 2024-12-31T23:59:59Z).

Response

The response includes a paginated list of commissions and pagination metadata.
success
boolean
Always true for successful responses
data
array
Array of commission objects. Each commission object has the same structure as the single commission response (see Get Commission endpoint).
pagination
object
Pagination metadata object containing:
  • page (integer): Current page number
  • limit (integer): Number of results per page
  • total (integer): Total number of commissions matching the filters
  • total_pages (integer): Total number of pages
  • has_next_page (boolean): Whether there is a next page
  • has_prev_page (boolean): Whether there is a previous page
curl -X GET "https://api.affonso.io/v1/commissions?limit=10&status=ready_for_payment&sales_status=complete" \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "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": "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-20T15:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 50,
    "total_pages": 5,
    "has_next_page": true,
    "has_prev_page": false
  }
}