---
title: "POST /sale"
method: POST
path: "/sale"
---

# POST /sale

`POST /sale`

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. <Note>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.  <br/><br/>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.<br/><br/>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.</Note> 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. <br/><br/>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.<br/><br/>**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.** <Tip>**For zero-decimal** currencies like `JPY`, `amount` and `mrr` parameters should be sent as **whole values**. <br/><br/>**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.</Tip><Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/track/sale`</Tip>

## Headers

- `Account-ID` string, required

## Request body

- union
  - object
    - `email` string, required — Email of the lead/sign-up. Required if uid is not provided.
    - `uid` string — uid of the lead added on signup tracking. Required if email 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.
    - `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.
    - `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.
  - object
    - `email` string — Email of the lead/sign-up. Required if uid is not provided.
    - `uid` string, required — uid of the lead added on signup tracking. Required if email 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.
    - `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.
    - `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 `200`

Sale tracked successfully

- object
  - `id` integer
  - `etype` string
  - `sale_amount` integer
  - `original_sale_amount` integer
  - `original_sale_currency` string, nullable
  - `event_id` string, nullable
  - `plan_id` string, nullable
  - `billing_period` string, nullable
  - `created_at` string, date-time
  - `referral` object
    - `id` integer
    - `email` string
    - `uid` string, nullable
  - `commissions` object[]
    - `id` integer
    - `status` string
    - `metadata` object
    - `is_self_referral` boolean
    - `commission_type` string
    - `created_by_user_email` string, nullable
    - `created_by_user_at` string, nullable
    - `sale_amount` integer
    - `original_sale_amount` integer
    - `original_sale_currency` string, nullable
    - `event_id` string, nullable
    - `plan_id` string, nullable
    - `tier` integer
    - `internal_note` string, nullable
    - `external_note` string, nullable
    - `unit` string
    - `fraud_check` string
    - `amount` integer
    - `is_paid` boolean
    - `is_split` boolean
    - `created_at` string, date-time
    - `status_updated_at` string, nullable
    - `promoter_campaign` object
      - `id` integer
      - `campaign_id` integer
      - `promoter_id` integer
      - `created_at` string, date-time
      - `promoter` object
        - `id` integer
        - `email` string
        - `name` string
      - `campaign` object
        - `id` integer
        - `name` string
        - `color` string
    - `referral` object
      - `id` integer
      - `email` string
      - `uid` string, nullable
    - `reward` object
      - `id` integer
      - `name` string

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `409` — Conflict

---

[API](https://skmtc.net/firstpromoter/apis/firstpromoter-batch-processes-api.md) · [All operations](https://skmtc.net/firstpromoter/apis/firstpromoter-batch-processes-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/firstpromoter/firstpromoter-batch-processes-api/versions/e15f0d026ccf/schema)
