Tracking & results
Tracking sales with postbacks
Send conversions from your affiliate network to your postback URL so sales are attributed to the right page and variation.
Your page sees visits and clicks, but the sale happens on the merchant’s site. A postback (also called a server-to-server or S2S postback) is how your affiliate network tells us a sale happened, so we can attribute it to the page and variation that sent the click.
How it fits together
- Your outbound offer link includes
{np_click_id}in a sub-id parameter. See Link tokens. - The visitor clicks; we generate a click id and the network stores it with the visit.
- When the visitor buys, the network calls your postback URL with that click id.
- The sale appears in your reports against that page and variation — separately from clicks, never mixed up with them.
Your postback URL
Find it under Tracking & postbacks in the app. It looks like this:
https://hooklander.com/api/postback/YOUR-KEY?click_id={click_id}&payout={payout}&txid={txid}¤cy=USD&status=approved
The key identifies your workspace — keep it private. If it leaks, rotate it in the same settings; the old URL stops working immediately, so update your networks afterwards.
Networks can call it with GET (parameters in the URL) or POST (form or JSON body). We reply with plain text: OK for a new or updated sale, duplicate for a repeat, or a short explanation of what was wrong, so your network’s postback log shows exactly what happened.
Parameters
| Parameter | Also accepted as | Meaning |
|---|---|---|
click_id | clickid, cid, subid, sub_id, aff_sub, np_click_id | The {np_click_id} value you passed to the network. Required unless txid is sent. |
payout | amount, revenue, sum | Your commission, such as 42.50. Optional. Must not be negative. |
txid | transaction_id, tid, order_id | The network’s unique transaction or order id. Recommended. |
currency | — | Three-letter code; defaults to USD. |
status | — | approved (default), pending or rejected. |
Parameter names aren’t case-sensitive. For status we also understand common network words: confirmed, paid and sale count as approved; hold counts as pending; declined, reversed, refunded and chargeback count as rejected.
If a value still looks like an unreplaced macro — for example {aff_sub} arriving literally — the postback is refused with a message telling you to check the macro name, rather than recording a sale against a nonsense id.
Filling in your network’s macros
In your network’s postback settings, replace the values in braces with that network’s own macros. Every network names them differently, so check its documentation.
Duplicates and status changes
Networks sometimes send the same postback twice, and some send a sale first as pending and later as approved or reversed. A sale is only ever counted once:
- With a
txid, there is one sale per transaction id. - Without a
txid, there is one sale per click id. - A repeat with the same status is ignored and answered with
duplicate. - A repeat with a different status updates the existing sale — pending becomes approved, or a rejection removes it from your revenue.
Only approved sales count towards sales and revenue in your reports. Sending txid is recommended: it lets one click produce several genuine sales (for example upsells) while still blocking duplicates.
Using a tracker too
If you run a tracker such as Voluum or RedTrack, its own postback setup doesn’t change. Use pass-through so the tracker’s click id reaches the offer. If you also want sales in Hooklander, pass {np_click_id} in a spare sub-id and add your postback URL as an additional postback, either at the network or forwarded from the tracker if it supports that.
Testing
Click through from your live page, then complete a test conversion if your network supports one. You can also call the postback URL yourself with a click id you’ve just generated — but remember that a test call is recorded like any other sale.