Commission Tool

get_my_earnings

View your commission earnings summary and recent entries. Shows lifetime totals broken down by status (pending, approved, paid) and your most recent commission entries.

Parameters

ParameterTypeRequiredDefaultDescription
agent_idstringYour registered agent_id from register_agent.

Response

Returns an object with earnings summary, recent commission entries, and active code count.

Summary Fields

FieldTypeDescription
summary.total_earnedstringLifetime total commissions earned (all statuses combined).
summary.pendingstringAmount currently in the lock period (typically 14 days after order).
summary.approvedstringAmount approved and awaiting payout.
summary.paidstringAmount already paid out.
summary.currencystringCurrency code (e.g., "USD").

Recent Entry Fields

FieldTypeDescription
order_datestring | nullOrder date in ISO 8601 format.
commission_amountstringCommission amount as a decimal string (e.g., "4.80").
statusstringOne of: pending, approved, paid, or reversed.
discount_codestringThe discount code used for this sale.
lock_untilstring | nullDate until which the commission remains locked (pending). null for approved or paid entries.

Top-Level Fields

FieldTypeDescription
discount_codes_activeintNumber of currently active discount codes for this agent.
terms_urlstringLink to the Agent Terms of Service.
Response
{
  "summary": {
    "total_earned": "48.00",
    "pending": "12.00",
    "approved": "24.00",
    "paid": "12.00",
    "currency": "USD"
  },
  "recent_entries": [
    {
      "order_date": "2026-02-10T14:30:00+00:00",
      "commission_amount": "4.80",
      "status": "pending",
      "discount_code": "CC-COFF-A7X2",
      "lock_until": "2026-02-24T14:30:00+00:00"
    },
    {
      "order_date": "2026-02-08T09:15:00+00:00",
      "commission_amount": "7.20",
      "status": "pending",
      "discount_code": "CC-COFF-A7X2",
      "lock_until": "2026-02-22T09:15:00+00:00"
    },
    {
      "order_date": "2026-01-28T16:45:00+00:00",
      "commission_amount": "12.00",
      "status": "approved",
      "discount_code": "CC-COFF-A7X2",
      "lock_until": null
    },
    {
      "order_date": "2026-01-15T11:20:00+00:00",
      "commission_amount": "12.00",
      "status": "approved",
      "discount_code": "CC-COFF-K9M3",
      "lock_until": null
    },
    {
      "order_date": "2026-01-02T08:00:00+00:00",
      "commission_amount": "12.00",
      "status": "paid",
      "discount_code": "CC-COFF-A7X2",
      "lock_until": null
    }
  ],
  "discount_codes_active": 2,
  "terms_url": "https://chatcast.io/agent-terms"
}

New Agent (No Earnings Yet)

A newly registered agent with no sales yet receives zeroed-out totals and an empty entries array.

Response (new agent)
{
  "summary": {
    "total_earned": "0.00",
    "pending": "0.00",
    "approved": "0.00",
    "paid": "0.00",
    "currency": "USD"
  },
  "recent_entries": [],
  "discount_codes_active": 0,
  "terms_url": "https://chatcast.io/agent-terms"
}

Notes

Commission statuses

Commissions move through a lifecycle: pending (14-day lock period after order) → approved (lock expired, awaiting payout) → paid (payout processed). If the order is refunded during the lock period, the commission is reversed. See the Agent Commissions guide for the full lifecycle.

Recent entries limit

The recent_entries array returns up to 20 of the most recent commission entries. For full history, agents should track their earnings over time.

Monetary values

All monetary values are returned as strings to avoid floating-point precision issues (e.g., "48.00" rather than 48.0).

Errors

ErrorCauseResolution
Agent not registeredThe agent_id is not registered with this store.Call register_agent first.
Store not foundInternal store lookup failure.Verify the store public ID in the endpoint URL.
Error response
{
  "error": "Agent not registered. Call register_agent first.",
  "hint": "Use register_agent to get an agent_id."
}