Commissions

Create a manual commission

A commission the engine did not produce: a bonus, or a missed referral attached to a sale. Approved on creation, held for the program's holding period, audited with your reason.

Scope: commissions:write (or write)

post/v1/commissions

Request

  • Base URL: https://api.affiliaterail.com
  • URL: https://api.affiliaterail.com/v1/commissions
  • Auth: HTTP bearer

Request body

program_idstring required

Prefixed id (prg_…)

partner_idstring required

Prefixed id (part_…)

amount_minorinteger required

Integer minor units (cents, pence). Never a float, never a string.

currencystring

ISO-4217

customer_idstring

Prefixed id (cus_…)

sale_idstring

Prefixed id (sale_…)

reasonstring required

Why this commission exists; written to the audit log

Example request

{
  "program_id": "prg_7uSyy9FqVLCFWrdPeZaK",
  "partner_id": "part_7uSyy9FqVLCFWrdPeZaK",
  "amount_minor": 2500,
  "currency": "USD",
  "customer_id": "cus_7uSyy9FqVLCFWrdPeZaK",
  "sale_id": "sale_7uSyy9FqVLCFWrdPeZaK"
}

Response

The new commission

idstring required

Prefixed id (com_…)

object'commission' required
program_idstring required

Prefixed id (prg_…)

partner_idstring required

Prefixed id (part_…)

sale_idstring nullable required

Prefixed id (sale_…)

customer_idstring nullable required

Prefixed id (cus_…)

rule_idstring nullable required

Which commission rule produced it

rule_branch_idstring nullable required

And which branch

kind'referral' | 'reward' | 'clawback' required
amount_minorinteger required

Integer minor units (cents, pence). Never a float, never a string.

revenue_minorinteger nullable required

Integer minor units (cents, pence). Never a float, never a string.

currencystring required

ISO-4217

status'pending' | 'approved' | 'due' | 'paid' | 'rejected' | 'voided' required
mature_atstring date-time nullable required

ISO-8601, UTC

approved_atstring date-time nullable required

ISO-8601, UTC

voided_atstring date-time nullable required

ISO-8601, UTC

void_reasonstring nullable required
payout_idstring nullable required

Prefixed id (pyt_…)

metadataobject nullable required

Your own key/value data, stored as given

created_atstring date-time required

ISO-8601, UTC

updated_atstring date-time required

ISO-8601, UTC

Example response

{
  "id": "com_7uSyy9FqVLCFWrdPeZaK",
  "program_id": "prg_7uSyy9FqVLCFWrdPeZaK",
  "partner_id": "part_7uSyy9FqVLCFWrdPeZaK",
  "sale_id": "sale_7uSyy9FqVLCFWrdPeZaK",
  "customer_id": "cus_7uSyy9FqVLCFWrdPeZaK",
  "rule_id": "flw_7uSyy9FqVLCFWrdPeZaK",
  "rule_branch_id": "flb_7uSyy9FqVLCFWrdPeZaK",
  "amount_minor": 2500,
  "revenue_minor": 2500,
  "currency": "USD",
  "mature_at": "2026-08-21T10:15:30.000Z",
  "approved_at": "2026-08-21T10:15:30.000Z",
  "voided_at": "2026-08-21T10:15:30.000Z",
  "payout_id": "pyt_7uSyy9FqVLCFWrdPeZaK",
  "created_at": "2026-08-21T10:15:30.000Z",
  "updated_at": "2026-08-21T10:15:30.000Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.