> For the complete documentation index, see [llms.txt](https://docs.goaffpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goaffpro.com/program-management/manage-affiliates/affiliate-profile-settings/send-s2s-callback.md).

# Send Postback/S2S Callback to the Affiliate

**GoAffPro** provides you with the option to send Postback/S2S callback to the affiliate when they get a new order.

To send Postback/S2S callback to the affiliate, go to the **All Affiliates** section in the **Affiliates** tab of the GoAffPro admin panel.

<figure><img src="/files/l5Vf33yf2j1sdTTrDwQ0" alt=""><figcaption><p>Affiliates > All Affiliates</p></figcaption></figure>

Here, click on the **affiliate's name.**

![Click on the affiliate's name](/files/-M1RqKy3C8P2MG93zfMu)

This will open up the affiliate's profile.

![Affiliate Profile](/files/-M1RrLPDUTV-yOkTyWk7)

Now, go to the **Settings** tab.

<figure><img src="/files/J5kxf6kXd1Xbt73O1Fa7" alt=""><figcaption><p>Settings tab</p></figcaption></figure>

Here, go to the S2S Callback section.

![S2S Callback](/files/-MIOklK1sUWoCq-pGXej)

Now, click on **Order created callback**.

![Click on Order created callback](/files/-MIOlNtvSk3EjEkp1Uod)

This will open up the Setup order created callback window.

![Order created callback](/files/-MIOlcO3R48kWiOKtUux)

Now, select the HTTP method.

{% hint style="info" %}
You can select either GET or POST.
{% endhint %}

![Select the HTTP method](/files/-MIOm4GT9w3b_DVOr16V)

After this, enter the URL.

![Enter the URL](/files/-MIOmVqRR6Vqickk-Gff)

Click on **Submit**.

![Click on Submit](/files/-MIOn3R00QGThczDyaED)

Finally, the newly set S2S callback will be saved.

![S2S Callback saved](/files/-MIOn8k5ygYxqgw9_-he)

The same process can be followed to set the Order updated callback.

![](/files/-MIOo7ypThqcmGiav_-b)

<details>

<summary>Formatting the Postback URL for Affiliate Tracking</summary>

Postback URLs enable you to receive real-time notifications whenever an order is tracked. You can add dynamic variables to your URL, ensuring that each postback contains valuable order and click data. Below are the supported variables and examples on how to use them:

**Supported Variables:**

The order number: {{order.number}}&#x20;

Total order amount: {{order.amount}}&#x20;

Commission generated for the order: {{order.commission}}&#x20;

Query parameter from the referral link (replace "param" with your chosen parameter name): {{link.query.param}}

Link hash parameter: {{link.hash}}&#x20;

Link path parameter: {{link.path}}&#x20;

Link sub\_id parameter: {{link.sub\_id}}&#x20;

**Examples:**

1. **Basic Postback URL (Send order number & amount)**

<https://yourpostback.com?number=\\{{order.number\\}}\\&amount=\\{{order.amount\\}}>

2. **Include commission generated**

<https://yourdomain.com/postback?order=\\{{order.number\\}}\\&amt=\\{{order.amount\\}}\\&comm=\\{{order.commission\\}}>

3. **Send a custom query parameter from the referral link**

If your affiliate link looks like: <https://yourstore.com/?campaign=summer>

You can capture it using:

<https://yourpostback.com/?order=\\{{order.number\\}}\\&campaign=\\{{link.query.campaign\\}}>

4. **Using Sub ID tracking**

<https://track.me/postback?order=\\{{order.number\\}}\\&subid=\\{{link.sub\\_id\\}}>

5. **Send all available data**

<https://yourpostback.com>?\
order={{order.number}}\
\&amount={{order.amount}}\
\&commission={{order.commission}}\
\&subid={{link.sub\_id}}\
\&hash={{link.hash}}\
\&path={{link.path}}

**Notes:**

* Ensure that your URL is properly URL-encoded if you include any special characters.
* Variables are automatically replaced with actual values before the postback is fired.

</details>

{% embed url="<https://www.youtube.com/watch?v=DC0tPa4POBY>" %}
Send S2S Callback to the Affiliate
{% endembed %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.goaffpro.com/program-management/manage-affiliates/affiliate-profile-settings/send-s2s-callback.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
