# 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="https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPzLtyP46oY7cyXnkw%2Fuploads%2FyJNq6sNhkQzFfEdX7XWp%2Fimage.png?alt=media&#x26;token=22bf756c-5194-41f3-bdc0-32c7282eef39" alt=""><figcaption><p>Affiliates > All Affiliates</p></figcaption></figure>

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

![Click on the affiliate's name](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-M1Rn2oIDGdii_aTRE4O%2F-M1RqKy3C8P2MG93zfMu%2FAnnotation%202020-03-03%20013129.png?alt=media\&token=ec76fcc2-2dc3-43ca-b078-497f1fc7d3ad)

This will open up the affiliate's profile.

![Affiliate Profile](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-M1Rn2oIDGdii_aTRE4O%2F-M1RrLPDUTV-yOkTyWk7%2FAnnotation%202020-03-03%20013817.png?alt=media\&token=ae0c54f0-a439-454e-b7c1-80e69cf22820)

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

<figure><img src="https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPzLtyP46oY7cyXnkw%2Fuploads%2Fy7Lam0OKJ1D96OnBCsWB%2FScreenshot%202024-09-30%202021492.png?alt=media&#x26;token=c84d1205-a5c9-46df-b39d-9686f24de010" alt=""><figcaption><p>Settings tab</p></figcaption></figure>

Here, go to the S2S Callback section.

![S2S Callback](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-MIOjPKF-qu88GX_wCuH%2F-MIOklK1sUWoCq-pGXej%2Fimage.png?alt=media\&token=973b17fc-a5d4-491c-a385-1f9dac671ae2)

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

![Click on Order created callback](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-MIOjPKF-qu88GX_wCuH%2F-MIOlNtvSk3EjEkp1Uod%2FScreenshot%202020-09-29%20173826.png?alt=media\&token=6b8de737-f898-4eb2-a51a-8dbf0e831a66)

This will open up the Setup order created callback window.

![Order created callback](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-MIOjPKF-qu88GX_wCuH%2F-MIOlcO3R48kWiOKtUux%2Fimage.png?alt=media\&token=d0bb6af0-b155-401a-b5d3-7e7cbcac2860)

Now, select the HTTP method.

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

![Select the HTTP method](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-MIOjPKF-qu88GX_wCuH%2F-MIOm4GT9w3b_DVOr16V%2FScreenshot%202020-09-29%20174201.png?alt=media\&token=4c12e079-7b81-473b-a3da-5418f50546e7)

After this, enter the URL.

![Enter the URL](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-MIOjPKF-qu88GX_wCuH%2F-MIOmVqRR6Vqickk-Gff%2FScreenshot%202020-09-29%20174433.png?alt=media\&token=b47da9b0-b0e9-4f04-bb55-7d102558f943)

Click on **Submit**.

![Click on Submit](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-MIOjPKF-qu88GX_wCuH%2F-MIOn3R00QGThczDyaED%2FScreenshot%202020-09-29%20174647.png?alt=media\&token=8370e7e0-1221-40b0-ada5-cf22a105756a)

Finally, the newly set S2S callback will be saved.

![S2S Callback saved](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-MIOjPKF-qu88GX_wCuH%2F-MIOn8k5ygYxqgw9_-he%2Fimage.png?alt=media\&token=993c5ef1-2544-420a-af91-6678cd11d8ff)

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

![](https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPzLtyP46oY7cyXnkw%2F-MIOjPKF-qu88GX_wCuH%2F-MIOo7ypThqcmGiav_-b%2FScreenshot%202020-09-29%20175150.png?alt=media\&token=2a647f51-4db9-4753-b46e-a793f66c4cb0)

<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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
