Skip to main content
POST
Track a sale

Authorizations

Authorization
string
header
required

Workspace API key, e.g. sa_live_…. Scopes: read / write / track / *.

Body

application/json

Visitor identity plus optional attribution hints. Provide at least one of visitor_id, fingerprint, ref, or manual_code so the event can be attributed.

visitor_id
string | null
fingerprint
string | null
ref
string | null

Referral code, used to pin the campaign/window. Matches whatever its case.

manual_code
string | null

Self-attribution code, if enabled. Matches whatever its case.

external_id
string | null

Idempotency key (your order or payment id). Required when a sale also sends product_id, subscription_id, customer_id, billing_interval or amount_cents, or a lead sends subscription_id or customer_id.

subscription_id
string

Your subscription id. Later renewals with the same id go to the affiliate who referred the first payment.

Required string length: 1 - 255
customer_id
string

Your customer id. Repeat purchases with the same id go to the affiliate who referred the first payment.

Required string length: 1 - 255
currency
string
default:usd

Lowercased. Defaults to usd.

Example:

"usd"

is_test
boolean
default:false
url
string<uri> | null
referrer
string | null
email
string<email> | null

The referred person's email. Shown on the affiliate's Referrals list and used to match later payments from the same customer.

name
string | null

The referred person's name, shown on the affiliate's Referrals list.

amount
number

Sale amount in major units (dollars). A numeric string is accepted. Prefer amount_cents.

Example:

99

amount_cents
integer

Sale amount in minor units, converted by the currency's decimals (JPY 0, KWD 3). Don't send it together with amount.

Required range: x >= 0
Example:

9900

product_id
string

Your own product id. Requires external_id.

Required string length: 1 - 255
product_name
string

Display name for this product in your dashboard. Doesn't affect commission.

Required string length: 1 - 255
billing_interval
enum<string>

Case-insensitive. Requires external_id. Anything else gives invalid_billing_interval.

Available options:
one_time,
month,
year

Response

Sale processed (attributed or not)

ok
boolean
Example:

true

attributed
boolean
Example:

true

conversion_id
string

Present when attributed.

visitor_id
string

Present when not attributed.

warning
string

Present on a sale sent without external_id.

Example:

"external_id_missing"