Documentation
Build on SmoothProfit
SmoothProfit is a white-label affiliate and referral platform. Agencies run programs for the brands they own; each brand gets its own portal, its own partners, and its own commission rules. This is the reference for integrating with it.
Connect a storefront
Mirror your product catalog in and start attributing sales.
Read →Install the tracker
A single script tag that captures ?ref= and survives to checkout.
Read →Build headless storefronts
Render affiliate pages in your own design with the landing-pages API.
Read →How the pieces fit
Four things have to happen for an affiliate to get paid, and the API mirrors them one-to-one:
- A visitor clicks a referral link. The tracker records it and stores the attribution in a first-party cookie.
- They buy. Your checkout calls
POST /v1/conversionswith the order and whatever attribution it has. - Commission is computed and held. The rate resolves from product rules, tiers, and program defaults; the conversion sits
pendingthrough the holding period. - It gets paid. A batch dispatch sends every matured, approved commission through the program's payout provider.
Base URL
Every endpoint is served from your SmoothProfit deployment under /api/v1. Paths in this reference are written as /v1/... for brevity — prefix them with /api when you call them.
Conventions
- Money is always integer cents. There are no floating-point amounts anywhere in the API. A $299.00 order is
29900. - Times are ISO 8601 UTC.
- Request and response bodies are camelCase even though the database is snake_case — you never see column names.
- An API key is bound to one program. You cannot read or write another program's data with it, and a mismatched
:programIdreturns 404 rather than 403.