Integration & API overview
How to integrate MeerPartners into your product: server-to-server conversion postback, tracking links, SSO via token-exchange, webhooks and embed widgets. Where a developer should start.
This section is for developers who embed the MeerPartners affiliate program into a third-party product: a website, a mobile app, a Telegram Mini App or a backend. Everything here is technically precise, with working examples in cURL, Node.js and Python.
If you are not a developer but a business owner, start with the Business cabinet section and the Integration & API keys page. You can issue a key and test the integration straight from the cabinet, without writing code.
Base URL
In the examples, the API base address is written as https://api.meerpartners.com or the placeholder {API_BASE}. The exact domain for your environment is provided by the platform operator — do not hardcode the address from these examples. Tracking links (/r/{code}, /p/{code}.gif) live on a separate domain and are issued together with the link itself.
What you can integrate
| Capability | Why | Authentication |
|---|---|---|
| Conversion postback (S2S) | Report sales/leads that happen on your side to the platform — the core mechanism | API key + HMAC |
| Tracking links and macros | Receive a click_id, pass through sub_id, link a click to an order | — (public redirect) |
| SSO / token-exchange | Open the influencer cabinet inside your product without a second registration | API key + HMAC (scope sso) |
| Webhooks | Receive server-side notifications: deposit credit, MeerID identity events | HMAC / RS256 |
| Embed SDK | Embed affiliate widgets (dashboard, links, payouts) in your own interface | scoped token from token-exchange |
The big picture
Most integrations are built around a single loop: a user clicks a partner's tracking link → lands in your product with a click_id label → performs an action → your backend sends a postback carrying that label → the platform attributes the conversion and accrues the commission.
Partner takes a tracking link ──► GET /r/{code}
│ (302 + cookie aff_attr + ?aff_click=<click_id>)
▼
YOUR product (website / app)
│ you store click_id next to the order
▼
user makes a purchase ──► YOUR backend
│ POST /api/v1/postback (HMAC signature)
▼
MeerPartners: attribution → conversion → commissionThe server-to-server postback is signed with HMAC over the API key secret — this is how the platform trusts the source and guarantees that the order amount was not tampered with after signing.
Where to start
Issue an API key
In the Business cabinet → Integration create a key with the scopes you need (postback, sso, readonly). The secret is shown only once — store it in your secret store. Details: API keys and signing.
Learn how to compute the HMAC signature
All server-to-server calls (postback, token-exchange, webhooks) are signed with the same scheme. Walk through the algorithm and verify it against a test example: API keys and signing.
Link the click to the order
Capture aff_click (a.k.a. click_id) on your landing page and store it next to the order, so you can later pass it to the postback as ref: Tracking links and macros.
Send your first postback
Assemble a signed request to POST /api/v1/postback and inspect the response. Before going live it is handy to run the test postback from the cabinet: Postback (S2S).
Sections
Three methods: MeerID OIDC for human sign-in, JWT Bearer for the cabinet, HMAC API key for server-to-server integrations. When to use which.
Where to issue a key, scopes, rotation and revocation. The exact HMAC signing algorithm with a worked example.
The core integration endpoint: fields, idempotency, responses and rejection codes. Working examples in three languages.
The /r/{code} format, sub_id parameters, the attribution cookie, macros and the pixel fallback. How to link a click to an order.
Exchange your user identifier for an affiliate token per RFC 8693 — to embed the affiliate program into your product.
Inbound webhooks: deposit credit from a provider and MeerID identity events. Signature and idempotency.
Embeddable influencer-cabinet widgets via a scoped token. The concept and its link to token-exchange.
The unified error format, HTTP codes and a table of domain codes with explanations.
A full end-to-end scenario: link → click → postback → checking the accrual.
Versioning
The API base prefix is /api/v1. Tracking redirects are outside the version: /r/{code} and /p/{code}.gif. Additive changes (new optional fields) ship without a version bump; breaking ones only with /api/v2.