POST
/
sale

Authorizations

X-API-KEY
string
headerrequired

Query Parameters

email
string

required if uid is null

Email of the lead/sign-up

uid
string

required if email is null

uid of the lead added on signup tracking

event_id
string
required

Transaction or sale event ID. It's required to avoid generating duplicate sales in case you mistakenly send the same API call multiple times.

amount
string
required

The sale amount in cents. It's used to calculate commissions/rewards.

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.

quantity
string

Number of subscriptions/items refunded. If it's only one you can skip this parameter.

plan
string

Customer plan ID from the billing provider. It's used to calculate rewards in case you use plan-level rewards feature.

currency
string

This field is only required if the currency of the sale is not the same with the one set on FirstPromoter settings. We'll automatically convert the amount from this currency to the default one set on your FirstPromoter account.

mrr
string

Sets the Monthly Recurring Revenue generated by the customer. It's used only for calculating the MRR generated by the program, not for calculating the commissions.

promo_code
string

For promo code/coupon code tracking. If you gave a unique coupon to a promoter and you added it on his promotion, you can pass it here and it will CREATE a new lead and a sale for that promoter(if doesn't exists already).

tid
string

you can avoid signup tracking call by providing the _fprom_tid cookie value(visitor tracking id) read on your system

ref_id
string

You can avoid signup tracking call by providing the ref_id(referral id) of the promoter

skip_email_notification
boolean

Set this to true to skip email notifications. Default is false.

Response

200 - application/json
id
integer
type
string
amount_cents
integer
reward
object
lead
object
promoter
object