What Is S2S API?
S2S API (Server) is for server-to-server conversion tracking. It does not rely on cookies or JavaScript. Your server captures a click_token from the visitor’s URL when they arrive via an affiliate link, then when a conversion happens your server sends a POST request to the S2S endpoint with that token and order details. Suitable for privacy-compliant tracking and server-side checkouts.
Where You Configure It
All integration methods are in the campaign form, under the Integration Setup tab. Use the AffiliatePro application admin.
How to Open the Form and Choose S2S API
- Log in to the AffiliatePro application admin.
- In the top bar, open the Marketing dropdown → click Campaigns.
- On the Campaigns page you will see four campaign type cards: Banner Campaign, Text Campaign, Link Campaign, Video Campaign. Click Create New on any card to create a campaign, or click the Edit button on an existing campaign to open it.
- In the General Settings tab, fill in the Campaign Name and set the Tool Type (what is tracked: Sale Integration is the typical choice for order-based S2S). Add the Target URL and other settings.
- Click the Integration Setup tab (plug icon).
- Under Choose Your Integration Method, click the S2S API (Server) card.
Critical Dependency: Save First
The API key, S2S Endpoint URL, parameter table, and example cURL are only shown after you save the campaign at least once. Until saved, the form shows: "Save this campaign first. Your API key and endpoint documentation will appear here after saving."
Click Save (stays on the form) — not Save & Close — so you can immediately copy the API key and endpoint URL that appear.
How S2S Tracking Works
- Visitor clicks the affiliate link and is redirected to your site. A unique
click_tokenis automatically appended to the URL. - Your site captures the
click_tokenfrom the URL and stores it (e.g. in session or database). - When a conversion happens, your server sends a POST request to the S2S Endpoint with the
click_token, order details, and the API key. - The system matches the
click_tokento the original click and records the commission automatically.
What the Form Shows After Saving
- API Key — copy it with the Copy button. Your server must send it with every conversion POST. Check the Regenerate API Key checkbox (warning: invalidates the current key — update all systems using the old key).
- S2S Endpoint URL — POST conversion data here (method: POST). The exact URL is shown in the form; it follows the pattern
.../integration/s2sConvert. - Required Parameters table —
api_key,click_token,order_id,order_total,order_currency. - Example cURL — a ready-to-use example with your actual API key and endpoint pre-filled.
Response Examples
- Success —
{"status":"success","message":"S2S conversion recorded successfully"} - Duplicate —
{"status":"duplicate","message":"Order already recorded"} - Error — e.g.
{"status":"error","message":"Invalid API key"}
Quick Access from the Campaigns List
In the Campaigns table, S2S API campaigns show a S2S API badge in the Integration Status column. Click the server icon button next to the badge to open the S2S setup modal and view the API key and endpoint without entering the full form.