Partner Transactions
The Partner Transactions API lists affiliate purchase rows for the selected store: each sale, and each refund of a sale, in one currency.
Overview
The Partner Transactions API provides one endpoint:
A partner transaction is one purchase row. A refund does not change the sale row. When the refund commission is not 0, it is a second item, with its own id, negative amount and commission_amount, and the same transaction_id as the sale. created_at on that refund item is when the refund was recorded. When the refund commission is 0, no refund item is written.
There is no get-one. transaction_id is the payment on Get Transaction. order_id is the order on Get Order.
Rows for the store referrer are omitted. Passing that partner, an archived partner, or an unknown partner as partner returns 404 — not an empty list.
Rows for archived partners are still listed when partner is omitted. On those rows ref is null, and partner_id returns 404 on Get Partner.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /partner-transactions | Paginated list in one currency. See Get Partner Transactions. |
Sales and refunds
type is sale or refund. Omit the filter to return both.
amount and commission_amount are signed integers in minor units (e.g. cents). Negative means a refund.
commission_percent is the percent stored on the row when it was recorded. It is an integer 0–100, where 20 means 20%, and it may be 0. It does not follow later edits to the partner or to the store default.
partner_name, ref, and variant_name are current values, not a snapshot. product_name is the name stored on the order. customer_id, customer_email, and customer_name are null when that customer is gone. The other related ids are null when the related record is gone.
Partner stats are not this list. Stats count only sale rows in sales_count, and they clamp amount and commission_amount at 0. This list still shows the negative refund rows.
Currency
Every call requires currency. One call returns one currency, and each item still includes currency. The code must be one the store sells in — see Get Store → currencies. There is no default.
Partner Transaction Object
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string | No | This row's UUID. A sale and its refund have different ids. |
type | string | No | sale or refund. |
amount | integer | No | Signed amount in minor units (e.g. cents). Negative on a refund. |
currency | string | No | Lowercase ISO-4217 code (e.g. usd). |
commission_percent | integer | No | Percent snapshotted on the row. Integer 0–100. 20 means 20%. May be 0. |
commission_amount | integer | No | Signed commission in minor units (e.g. cents). Negative on a refund. |
created_at | string | No | When the sale was recorded, or when the refund was recorded (ISO 8601). |
partner_id | string | Yes | Partner UUID. For an archived partner, Get Partner returns 404. |
partner_name | string | Yes | The partner's current name. |
ref | string | Yes | The partner's current ?ref= slug. Null when the partner is archived. |
customer_id | string | Yes | Customer UUID. Null when the customer is gone. |
customer_email | string | Yes | Customer email. Null when the customer is gone. |
customer_name | string | Yes | Customer name. Null when the customer is gone. |
product_id | string | Yes | Product UUID. |
product_name | string | Yes | Product name snapshotted on the order. |
variant_id | string | Yes | Variant UUID. |
variant_name | string | Yes | The variant's current name. |
order_id | string | Yes | Order UUID. Pass it to Get Order. |
transaction_id | string | Yes | Payment UUID. A sale and its refund share this id. Pass it to Get Transaction. |