Affihub
DocsAPI ReferenceCommissions

Commissions

Overview

Commissions are records of money owed to partners for successful referrals. They are created automatically when a payment webhook (Stripe or Paddle) is processed, or manually via the custom checkout flow.

All endpoints require API key authentication.

List commissions

GET /api/v1/commissions

Query parameters

Param Type Default Description
page number 1 Page number
per_page number 20 Results per page (max 100)
partner_id string Filter by partner
status string Filter by status
from string Start date (ISO 8601)
to string End date (ISO 8601)

Example

curl "https://api.affihub.com/api/v1/commissions?status=pending&per_page=50" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "data": [
    {
      "id": "com_abc123",
      "program_id": "prog_xxx",
      "partner_id": "par_abc123",
      "amount_cents": 1980,
      "txn_amount_cents": 9900,
      "commission_pct": 20,
      "status": "pending",
      "provider": "stripe",
      "provider_event_id": "evt_xxx",
      "customer_email": "buyer@example.com",
      "created_at": "2026-04-10T15:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20
}

Approve commissions

POST /api/v1/commissions/approve

Bulk approve commissions by ID. Maximum 200 IDs per request.

Request body

{
  "ids": ["com_abc123", "com_def456", "com_ghi789"]
}

Example

curl -X POST "https://api.affihub.com/api/v1/commissions/approve" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["com_abc123", "com_def456"]}'

Response

{
  "approved": 2,
  "ids": ["com_abc123", "com_def456"]
}

Only commissions with status pending or review can be approved.

Reject commissions

POST /api/v1/commissions/reject

Bulk reject commissions by ID. Maximum 200 IDs per request.

Request body

{
  "ids": ["com_abc123"]
}

Example

curl -X POST "https://api.affihub.com/api/v1/commissions/reject" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["com_abc123"]}'

Only commissions with status pending or review can be rejected.

Commission statuses

Status Description Can transition to
pending Awaiting provider review approved, rejected
review Flagged for review (e.g., subscription canceled) approved, rejected
approved Approved, awaiting payout processing
rejected Denied by provider — (terminal)
processing Included in a generated payout paid
paid Payout completed — (terminal)

Commission lifecycle

Webhook received


   pending ──────► approved ──────► processing ──────► paid

      ├──► review ──► approved                          

      └──► rejected (terminal)                          

Fields reference

Field Type Description
id string Commission ID (com_ prefix)
program_id string Program this commission belongs to
partner_id string Partner who earned this commission
amount_cents number Commission amount in cents
txn_amount_cents number Total transaction amount in cents
commission_pct number Commission rate applied
status string Current status
provider string stripe or paddle
provider_event_id string Payment provider's event ID
customer_email string Customer's email
created_at string ISO 8601 timestamp