Tracking Api
Tracking sales and commissions
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.
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.
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, it means that the sale is not a referral sale and you’ll get a 204 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
For other currencies,
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.HTTP Request
POST https://v2.firstpromoter.com/api/v2/track/sale
POST
Authorizations
API key passed as a Bearer token in the Authorization header
Headers
Account identifier that specifies which account is making the request
Example:
"acc_123456"
Body
application/json
Response
200
application/json
Sale tracked successfully
The response is of type object
.