> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Affiliate postbacks (outbound S2S)

> Send server-to-server conversion notifications from Partnero to your partners' tracking platforms. Set up postback URLs with placeholders like {click_id} and {commission_amount}, echo partner sub-IDs, and let partners self-manage postbacks.

Affiliate postbacks notify a **partner's own tracking platform** — server-to-server — whenever their referral converts in Partnero. Partners who buy media or run traffic through external trackers see conversions inside their own tools, in real time, without CSV exports or manual reconciliation.

## How it works

1. The partner's tracker generates a click ID and passes it through the referral link as a query parameter, for example `https://go.yourdomain.com/john?clickId=TRACKER_CLICK_ID`.
2. Partnero captures the value at click time (see [trackable query parameters](/guides/postbacks/postback-url-tracking#trackable-query-parameters-sub-ids)).
3. When the referral converts, Partnero calls the partner's **postback URL**, substituting placeholders with real values — including the tracker's original click ID.
4. The conversion appears in the partner's tracking platform.

Affiliate postbacks work with **any** Partnero tracking method: PartneroJS, the REST API, billing integrations, or [inbound postback tracking](/guides/postbacks/postback-url-tracking).

## Events

| Event                 | Fires when                                                                                                                                                                      |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `transaction.created` | A sale is recorded for the partner's referral                                                                                                                                   |
| `commission.approved` | A commission reaches the approved state — immediately at creation for programs without a review period, or when approved manually or automatically after the review period ends |

<Tip>
  If you pay commissions only after a review period, subscribe partner postbacks to `commission.approved` so their tracker reflects payable conversions, not just raw sales.
</Tip>

## Create a postback (merchant)

1. Open **Program → Integration → Postbacks** (affiliate programs).
2. Click **Create postback** and select the partner.
3. Enter the postback URL with placeholders:

```
https://tracker.example.com/postback?clickid={clickId}&amount={commission_amount}&status={commission_status}
```

4. Choose the HTTP method:
   * **GET** — placeholders are substituted directly in the URL.
   * **POST** — placeholders are substituted in the URL *and* all resolved values are sent as a JSON body.
5. Select which events trigger the postback.

Placeholders shown in the form are clickable — click one to append it to the URL as `name={placeholder}`.

## Placeholders

| Placeholder              | Value                                                                             |
| ------------------------ | --------------------------------------------------------------------------------- |
| `{click_id}`             | Partnero's click identifier                                                       |
| `{partner_key}`          | Partner identifier                                                                |
| `{customer_key}`         | Customer identifier                                                               |
| `{transaction_key}`      | Transaction identifier (order/invoice)                                            |
| `{transaction_action}`   | Transaction action, e.g. `sale`                                                   |
| `{transaction_amount}`   | Transaction amount                                                                |
| `{transaction_currency}` | Transaction currency                                                              |
| `{commission_key}`       | Commission identifier (`commission.approved` only)                                |
| `{commission_amount}`    | Calculated commission amount                                                      |
| `{commission_currency}`  | Commission currency                                                               |
| `{commission_status}`    | Commission status                                                                 |
| `{event}`                | Event name (`transaction.created` or `commission.approved`)                       |
| `{created_at}`           | ISO 8601 timestamp                                                                |
| `{<sub-id>}`             | Any trackable query parameter captured at click time, e.g. `{clickId}`, `{affS1}` |

All values are URL-encoded before substitution. Unknown placeholders resolve to an empty string.

<Note>
  `{click_id}` and sub-ID placeholders resolve from the click record, so they carry values only when **Postback (S2S) tracking** is enabled for the program — that's what records clicks. For sub-IDs, the parameter name must also be defined under **Program settings → Referral link customization → Trackable query parameters**, and the partner must actually include it in the referral link at click time. All other placeholders work regardless.
</Note>

## Let partners manage their own postbacks

On the Postbacks page, enable **Let partners manage their own postbacks**. Partners then get a **Postbacks** section in their partner portal profile where they can add, edit, and disable their own postback URLs — with the same placeholders and events.

This is the recommended setup for programs with many media-buying partners: each partner configures the postback format their tracker expects, without your involvement.

## Delivery and reliability

* Postbacks are sent **asynchronously** from a queue, so they never slow down conversion processing.
* Request timeout: 5 seconds.
* Failed deliveries are retried automatically: up to **3 attempts** in total, with 30-second and 5-minute backoff between them.
* Every attempt is logged. Open **Logs** on a postback to see the HTTP status, response body, and error for each delivery — the postback list also shows an error-rate indicator per postback.

## Example: partner using an external tracker

1. You (the merchant) add `clickId` as a trackable query parameter in program settings.
2. The partner configures their tracker to send traffic to `https://go.yourdomain.com/john?clickId={tracker_click_macro}`.
3. A visitor clicks. Partnero stores the tracker's click ID as a sub-ID and redirects the visitor to your site.
4. The visitor purchases; the sale is recorded in Partnero (via any tracking method).
5. Partnero fires the partner's postback — `https://tracker.example.com/postback?clickid={clickId}&payout={commission_amount}` — with the tracker's original click ID filled in.
6. The partner's tracking platform registers the conversion automatically.

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Do affiliate postbacks require inbound postback tracking?">
    No — postbacks fire on conversions from any tracking method. One nuance: the `{click_id}` and sub-ID placeholders resolve from click records, which are only created while **Postback (S2S) tracking** is switched on. If your partners' trackers need their click IDs echoed back, keep it enabled.
  </Accordion>

  <Accordion title="Can one partner have multiple postbacks?">
    Yes. Create as many postbacks as needed — for example one per tracker, each with different events.
  </Accordion>

  <Accordion title="What happens if the partner's endpoint is down?">
    Partnero makes up to three delivery attempts (with 30-second and 5-minute backoff) and logs every one. After the final failure the delivery is marked as failed in the logs; the conversion itself is unaffected.
  </Accordion>

  <Accordion title="Are postbacks available for refer-a-friend programs?">
    No. Affiliate postbacks are available for affiliate programs only.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Postback URL tracking" icon="arrow-right-to-bracket" href="/guides/postbacks/postback-url-tracking">
    Keyless inbound conversion tracking with click IDs
  </Card>

  <Card title="Outgoing webhooks" icon="webhook" href="/guides/webhooks/outgoing-webhooks">
    JSON event notifications for your own systems
  </Card>
</CardGroup>
