# Postbacks

A postback tells a partner (an affiliate network, an ad network, your SMS panel or your own server) that a conversion came from them, through an address filled with values such as their click ID and the order value. Each transaction is sent once.

## What a postback is

Many affiliate and ad networks need a postback to pay commission or optimise a campaign: a request to their address carrying their own click ID and the order value. The **Postbacks** page is in the **Links** menu (`/links/postbacks`); creating one needs permission to edit the website's settings.

## Create a postback

1. On **Postbacks**, select **New postback**.
2. Pick a starting point and replace the address with the one your partner gave you.
3. Click a macro to add it where the cursor is, for example `https://partner.example/pb?cid={click_id}&payout={revenue}`.
4. Under **When it fires**, leave your key events on or list other event names.
5. Under **Which conversions**, say which tracked links or traffic sources belong to this partner.
6. Under **Partner click ID parameter**, enter the parameter your partner adds to its links, for example `click_id`.
7. Save, then use **Send test** to send a sample request.

> **Telling a test from a real conversion**
>
> A test send appends `test=1` to the address so the partner doesn't take it for a real conversion.

## Macros

| Macro | Value |
| --- | --- |
| `{click_id}` | The partner's click ID; otherwise the xen click ID |
| `{param:<name>}` | Any parameter captured from the landing address |
| `{event_name}` `{event_id}` | Event name and ID |
| `{transaction_id}` | Transaction or order ID |
| `{revenue}` `{currency}` | Order value and currency |
| `{timestamp}` `{timestamp_ms}` | Event time |
| `{link_code}` `{link_name}` | Tracked link code and name |
| `{recipient_ref}` | The reference you uploaded for a phone's link |
| `{source}` `{medium}` `{campaign}` `{content}` `{term}` | The last campaign touch |

No macro sends an email address, phone number or IP address.

## Which conversions are sent

In **Only this partner's conversions** mode, a postback is sent when the last campaign touch before the conversion came through one of this partner's links or sources, inside the window (30 days by default). **Every conversion** is for sending to your own server or reporting system.

## Frequently asked questions

### If a customer opens the thank-you page twice, are two postbacks sent?

No. The transaction ID (transaction_id or order_id) is the sending key, and each transaction is sent once per postback.

### Are purchases recorded from WHMCS or my own server sent too?

Yes. Conversions that arrive server-to-server are checked exactly like browser conversions and get a postback when they belong to the partner.

### What if someone clicks the partner's link, comes back through a Google ad and then buys?

In "Only this partner's conversions" mode the last campaign touch decides. If that is the Google ad, the partner gets no postback.

## Related

- [Tracked links](https://docs.adpix.io/en/analytics/marketing/tracked-links/)
- [Key events](https://docs.adpix.io/en/analytics/collect/key-events/)
- [Alerts and webhooks](https://docs.adpix.io/en/analytics/admin/alerts-and-webhooks/)
- [Webhooks and HMAC signing](https://docs.adpix.io/en/developers/analytics/developers/webhooks-and-hmac/)

---

[Docs](https://docs.adpix.io/en/analytics/marketing/postbacks/) · AdPix
