MMeerPartners docs

Examples: cURL, Node, Python

An end-to-end MeerPartners integration scenario: get a tracking link, capture the click_id, send a signed conversion postback and check the accrual. Working code.

This page assembles the integration into one end-to-end scenario: from the tracking link to checking the accrual. The code is working — plug in your own key_id, secret and {API_BASE} (the exact domain is provided by the operator).

What you'll need

An API key with the postback scope (issued in the cabinet), its secret, the API base URL {API_BASE} and the link's tracking domain. The signature is computed on the server only.

End-to-end scenario

1) Partner takes a tracking link to your offer          → /r/{code}
2) User clicks, lands on you with aff_click             → your landing page
3) You store aff_click next to the order                → your database
4) User buys → you send a signed postback               → POST /api/v1/postback
5) You verify the accrual was created                   → postback response / cabinet

The partner creates the link in their cabinet. As a business you do not need to call the API separately — the link looks like this:

https://go.meerpartners.com/r/a8Kf2?sub1=youtube&sub2=video-42

On a click, the platform redirects the user to your landing page and appends aff_click:

HTTP/1.1 302 Found
Location: https://your-product.io/promo?sub1=youtube&aff_click=9b1f7c2e-…

More details — Tracking links and macros.

Steps 2–3. Capture click_id and bind it to the order

On the landing page you read aff_click and store it until checkout.

Browser: store aff_click
const clickId = new URLSearchParams(location.search).get("aff_click");
if (clickId) localStorage.setItem("aff_click", clickId);
// at checkout — send clickId to your backend and write it into the order record

Step 4. Send a signed postback

When the order is paid, your backend sends the conversion. Below are complete, self-contained examples with HMAC signature computation.

#!/usr/bin/env bash
set -euo pipefail
 
API_BASE="https://api.meerpartners.com"
KEY_ID="key_3f9a1c"
SECRET="sk_live_9f2a…"
 
# ref = the aff_click captured earlier
BODY='{"external_order_id":"ORD-558123","event_type":"sale","ref":"9b1f7c2e-…","sub_id":"video-42","amount":"19.99","currency":"USD","status":"approved","occurred_at":"2026-06-14T10:15:00Z"}'
 
TS=$(date +%s)
BODY_HASH=$(printf '%s' "$BODY" | openssl dgst -sha256 -hex | awk '{print $NF}')
SIGNING=$(printf '%s\n%s\n%s\n%s' "POST" "/api/v1/postback" "$TS" "$BODY_HASH")
SIG=$(printf '%s' "$SIGNING" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $NF}')
 
curl -sS -X POST "$API_BASE/api/v1/postback" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key-Id: $KEY_ID" \
  -H "X-Timestamp: $TS" \
  -H "X-Signature: $SIG" \
  --data "$BODY"
# → {"accepted":true,"duplicate":false,"conversion_id":7741,"commission":{...}}

Step 5. Check the accrual

A successful postback response already has everything you need:

{
  "accepted": true,
  "duplicate": false,
  "conversion_id": 7741,
  "commission": {
    "id": 7741,
    "amount": "2.50",
    "currency": "USD",
    "status": "pending",
    "hold_until": "2026-06-28T10:15:00Z"
  }
}
  • conversion_id — the conversion was created.
  • commission.status: "pending" — the commission is accrued and is waiting for the end of the hold period.
  • hold_until — when the commission will become available.

The same conversions are visible to the business in Analytics, and to the partner in their statistics and payouts.

Test the integration before going live

Do not wait for a real sale — run the test postback from the cabinet. It goes through the real flow and confirms that the key, signature and offer binding work.

Correct-integration checklist

  • The API key secret lives on the backend only, not in the frontend and not in the repository.
  • The signature is computed over the raw bytes of the body; the body is serialized once.
  • The server clock is synced (NTP) — otherwise POSTBACK_STALE_TIMESTAMP.
  • aff_click is captured on the landing page and stored until payment, then sent in ref.
  • Retries — only on 5xx/timeout, with backoff; on 2xx and 4xx (except replay) — stop.
  • external_order_id is stable across retries — idempotency will not double the accrual.

What's next