Skip to content

Postback API

A postback is a request from the advertiser’s server to Postbackly saying “this click became a sale”. No pixel, no cookie, nothing in the visitor’s browser.

Overview

  1. A visitor arrives on the landing page through a Postbackly link, with pbclid=… in the URL (see the redirect documentation).
  2. Your site keeps that value with the visitor’s session or order, on your own domain.
  3. When the order is confirmed, your server calls the postback URL with the pbclid as click_id.
  4. Postbackly records a conversion for the click’s offer, publisher and sub IDs, with status pending.

Endpoint

https://go.postbackly.click/postback?click_id={pbclid}&txid={order_id}&payout={amount}&key=YOUR_OFFER_KEY

GET with query parameters, or POST with an application/x-www-form-urlencoded body. HTTPS only. Replace YOUR_OFFER_KEY with the postback key shown on the offer in your dashboard, and the {…} placeholders with your platform’s own variables.

Parameters

NameRequiredDescription
click_idyes*The pbclid value the landing page received.
gclid*Only when the landing page has no pbclid (Google Ads parallel tracking, see below): the gclid Google Ads added to the landing URL. It is matched to the click that carried the same gclid on the tracking link, so keep gclid={gclid} in the tracking template. *Send click_id or gclid; if both are sent, click_id is used.
keyyesThe secret postback key of the offer the click belongs to.
txidnoYour order or transaction ID. Unique per offer: the same txid is recorded only once. Without it, each click can have only one conversion.
payoutnoCommission for this conversion, as a number (for example 45000 or 12.5). If missing, the offer’s default payout is used.
currencynoThree-letter currency code such as VND or USD. Each account reports in one currency, set in the dashboard. If sent, it must match that currency, otherwise the postback is refused with 400; amounts are never converted.

Do not add a parameter named url: on the tracking domain, url is reserved for redirects, and a request carrying it is treated as a click, not a postback.

Examples

GET

curl "https://go.postbackly.click/postback?click_id=Rk7pW2xQa9Lm_3Tc&txid=A1043&payout=45000&key=YOUR_OFFER_KEY"

POST form

curl -X POST "https://go.postbackly.click/postback" \
  -d click_id=Rk7pW2xQa9Lm_3Tc -d txid=A1043 -d payout=45000 -d currency=VND -d key=YOUR_OFFER_KEY

Response

HTTP/1.1 200 OK
Content-Type: application/json

{"status":"ok","conversion_id":1287}

Responses

Every response is JSON.

StatusMeaningWhat to do
200Conversion recorded. The body contains conversion_id.Done.
400A required parameter is missing or a value is malformed (for example a payout that is not a number).Fix the request; do not retry it unchanged.
403The key does not match the click’s offer, or the offer or account is suspended.Check the key in your dashboard.
404No click with this click_id (or gclid), or the click is older than 90 days.Check that you send the pbclid unchanged; do not retry.
409This txid is already recorded for this offer (or, without txid, this click already has a conversion).Already counted. Stop retrying.

Duplicates and retries

Postbacks are idempotent by txid. If your server times out or is unsure whether a postback arrived, send it again with the same txid: you get 200 the first time and 409 afterwards, never a second conversion. Retry on network errors and 5xx responses, with increasing delays; do not retry 400, 403 or 404.

For several conversions from one click, such as a second purchase, send each with its own txid.

Keeping the key safe

  • Each offer has its own key, so one leaked key cannot create conversions on your other offers.
  • Send postbacks only from your server. Never put the key in a browser pixel, JavaScript, a mobile app or a page that visitors can view.
  • Prefer POST: query strings are more likely to end up in logs along the way.
  • We compare keys in constant time and record a postback only when the key matches the click’s offer.
  • If you think a key has leaked, write to contact@postbackly.click and pause the offer until it is replaced; you can still reject any conversion you did not expect.

pbclid itself is not a secret: it appears in the landing page URL. The key is what proves a postback comes from you.

Approval and reconciliation

pending→approvedorrejected

Every conversion starts as pending. For a payout period, the advertiser or network approves or rejects conversions one by one or in bulk, for example rejecting cancelled orders. The reconciliation view shows pending, approved and rejected totals per publisher, and exports a CSV to pay from.

Postbackly only keeps the records. We do not hold, collect or transfer commission money; payment is between you and your publishers.

Test checklist

  1. Open a publisher link yourself and check that the landing page URL ends with pbclid=….
  2. Send a postback with that value and a test txid: expect 200.
  3. Send the same request again: expect 409.
  4. Find the conversion in your reports as pending, then reject it so it does not count.