v1
latestOpenAPI 3.0.12026-08-062532117.6 KBCreate a sale
Records a sale and pays out the resulting commission.
You must identify who the sale belongs to with one of referralId, email or promoCode. referralId is flexible: it accepts a referral UUID, an affiliate UUID, an affiliate link slug, or a numeric click ID. email matches an existing referral by email address.
totalEarned is required and must be non-zero. A customer name and email are also required — they are taken from the matched referral when you do not send them explicitly.
commissionRate overrides the affiliate's rate for this sale only. tax and shipping are deducted before commission is calculated, but only when your program has the matching deduction setting enabled.
When you pass promoCode, the code is validated for existence, active state, expiry and redemption limits, and its redemption counters are incremented on success.
Request body
Response
The recorded sale. Returns null when no affiliate could be resolved from the details supplied — check the response before assuming a commission was created.