partnero_partner / partnero_referral cookies, and no client-side calls to the Partnero API.
Why use S2S
- Resilient to tracking blockers — ad-blockers, cookie-blocking browsers (Safari ITP, Brave, in-app browsers), and snippet load failures don’t affect attribution.
- Backend-only stacks — works without any frontend JavaScript on your site.
- Mobile and machine-to-machine — required for native apps and headless integrations.
- Strict privacy regimes — no third-party-style storage, no extra consent banner row.
- Full control — you decide where the referral key lives between landing and sign-up.
Endpoints used
All requests use
https://api.partnero.com with Authorization: Bearer YOUR_API_KEY.
How it works
- Visitor lands via a referral link — for example
yoursite.com?aff=REFERRAL_KEY. The exact query parameter depends on your program; confirm it under Programs → Settings → Referral links in the Partnero dashboard. - You capture the key — read it from the URL and persist it your way (server session, database row keyed by anonymous ID, your own first-party storage, etc.).
- You call
POST /v1/customersat sign-up withpartner.key(affiliate) orreferring_customer.key(refer-a-friend). - You call
POST /v1/transactionsat purchase—or let a connected billing integration do it for you.
Three valid paths
All options below are server-side; they differ in what carries the attribution and where it comes from.
For the hybrid path, see Affiliate API integration and Refer-a-friend API integration, which both show reading the PartneroJS cookie from the request.
Step 1: Capture the referral key
Read the parameter from the landing URL and persist it.- Server (read query)
- Browser (forward to backend)
- SPA (sessionStorage)
- Mobile
Step 2: Track sign-ups
When the user creates an account, callPOST /v1/customers with the key from Step 1.
Affiliate programs
Usepartner.key for the affiliate program key.
- cURL
- Node.js
- PHP
- Python
Refer-a-friend programs
Usereferring_customer.key for the referrer. Omit the field entirely if the visitor was not referred.
- cURL
- Node.js
- PHP
- Python
referral_link so you can show the new customer their share URL. See Refer-a-friend API integration for stats, balance, and reward endpoints.
Step 3: Track sales
Record purchases against the samecustomer.key you sent at sign-up. Partnero calculates the commission automatically.
- cURL
- Node.js
- PHP
- Python
When you cannot persist the landing click
If storing the referral key between landing and sign-up is impractical (e.g., podcast or video referrals), use attribution that doesn’t depend on a remembered visit:- Coupon-based tracking — partners share unique promo codes; checkout integrations attribute the sale.
- Transaction-based attribution — set the program to transaction-based and pass
partner_keyin payment metadata so each charge selects the partner.
Comparison
Checklist
- Confirm your program’s referral link URL format and query parameter in the Partnero dashboard.
- Persist the referral key with your session or storage between landing and sign-up.
- Call
POST /v1/customersfrom your server withpartnerorreferring_customer. - Call
POST /v1/transactions(or let a billing integration do it) using the same customerkey.
Next steps
Postback URL tracking
Keyless inbound conversion tracking with click IDs
Affiliate API
Cookie-based variant and full customer / transaction fields
Refer-a-friend API
Referrer fields, rewards, and dashboard API calls
Mobile apps
Deep links and native storage patterns
API reference
Full REST API documentation
