Skip to main content
POST
cURL
Assign sales and commissions to your promoters. To track sales and generate commissions correctly, you need to use this API call each time a non-zero amount sale is processed in your system, even if it comes from a recurring charge or one-time charge.
To avoid fraudulent sales, we don’t use JS conversion pixels to track sales, which are very unreliable and can be easily faked. Instead, we use server-side tracking for all sales to ensure that a sale is tracked only when you actually receive money in your billing account.

To maintain the same standards with the API, we recommend making the sale API call (this call) only when you receive confirmation of the sale from your billing provider, such as from a webhook, an IPN, or a success response from an API charge call.

You just need to pass the sale amount (before taxes) and we’ll take care of the rest. The commissions/rewards will be calculated based on that amount and the plan ID, in case you use the plan-level rewards feature.
Using email or UID parameters, we identify the lead/customer who generated the sale, which also helps us determine the promoter who owns the reward/commission.

The lead is added to our system either by the client signup tracking script when the user signs up or by calling the signup API endpoint. There is also the option to bypass the signup tracking by using TID or ref_id parameters, which will create the lead and assign the sale in one go.

If we don’t find the lead in our system, then it means that the sale is not a referral sale, you’ll get a 404 response. Also, if the promoter is banned, you’ll get a 404 response. You don’t have to identify which sale is from referrals and which is not; we’ll take care of that.
For zero-decimal currencies like JPY, amount and mrr parameters should be sent as whole values.

For other currencies, amount and mrr parameter values should be in cents, i.e., you will need to multiply the value by 100 before sending the request.

Authorizations

Authorization
string
header
required

API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys

Headers

Account-ID
string
required

Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations

Body

application/json
email
string
required

Email of the lead/sign-up. Required if uid is not provided.

event_id
string
required

Transaction or sale event ID. Required to avoid duplicate sales.

amount
integer
required

The sale amount in cents. For zero-decimal currencies like JPY, amount should be whole values.

uid
string

uid of the lead added on signup tracking. Required if email is not provided.

quantity
integer

Number of subscriptions/items. Optional if quantity is 1.

plan
string

Customer plan ID from billing provider. Used for plan-level rewards.

currency
string

Required only if different from FirstPromoter settings default currency.

mrr
string

Monthly Recurring Revenue generated by the customer.

promo_code
string

For promo code tracking.

billing_country
string

Customer's billing country as an ISO 3166-1 alpha-2 code (e.g. US). Alpha-3 codes and English country names are also accepted. Unrecognized values are ignored. Shown as the referral and commission country in the dashboard.

Example:

"US"

tid
string

Visitor tracking ID from _fprom_tid cookie.

ref_id
string

Referral ID of the promoter.

skip_email_notification
boolean

Set true to skip email notifications. Default is false.

Response

Sale tracked successfully

id
integer
Example:

45831949

etype
string
Example:

"sale"

sale_amount
integer
Example:

2000

original_sale_amount
integer
Example:

2000

original_sale_currency
string | null
Example:

null

event_id
string | null
Example:

null

plan_id
string | null
Example:

null

billing_period
string | null
Example:

null

created_at
string<date-time>
Example:

"2025-04-25T09:39:42.289Z"

referral
object
commissions
object[]