> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.cartpanda.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# S2S Postback

S2S (server-to-server) postback is a tracking method that you can use as both a vendor and an affiliate to notify your marketing platform (e.g. Redtrack) about your sales/conversions. This system sends the conversion directly from our server to the marketing platform's server.

It is mainly composed of two elements: *promolink* and *postback URL.*

### Promolink

The *promolink* is the electronic address (URL) that will be used to promote the product on marketing platforms. In other words, it is the campaign link.
If you are a vendor, it will be the product link + *click ID.*
If you are an affiliate, it will be the product's affiliate link (link containing your *afid)* + *click ID.*
Some marketing platforms generate this link automatically with the *click ID* and other parameters.

### Postback URL

This link works as a receiver of conversions and sales information. It is provided by the marketing platform you are using and it is through this link that our system will send the information so that your campaigns are properly updated.

In the integration setup step, follow the instructions to use it properly.

# Step One: Creating the Integration

You will need to access the S2S integrations configuration page under [Admin > Tracking & Scripts > S2S Tracking](https://accounts.cartpanda.com/settings/pixels) and click on **New Integration**.

If you are an **affiliate**, you will need to configure the S2S integration directly on the product under **Products > All Products > Products I promote**, clicking on the desired product to open its settings.

![](https://storage.crisp.chat/users/helpdesk/website/626e5bed518e1800/image_32odxk.png)

# Step Two: Configuration

On the new integration screen, you must correctly fill out the form with the requested information.

### Basic information

* **Name and Service** — you can fill in these as you prefer, they are identifiers for better identification if you work with multiple integrations.

* **Currency** — in this field you must define in which currency you want the amounts to be sent in the postback. The system will convert to the selected currency: USD, EUR, BRL or in the case of the option: “Do not convert amounts” the amounts will be sent in the currency of the sale.

* **Apply to** — define in this section the rules for activating and sending the postback according to specific products, collections or for all products (always).

![](https://storage.crisp.chat/users/helpdesk/website/626e5bed518e1800/image_13952fd.png)

### Postback URL

This step is the most important to ensure the integration works properly. Here we will define the URL to which the system will send conversions and sales information.

* The postback URL is made up of: promolink + click ID + parameters with sales information linked together.

* The parameters available for use are indicated below the postback URL, and must be linked together with the `&` symbol after the click ID.

* Example: https://domain.com/postback?click_id={cid}&amount={total_price}&type={order_type}&product={product_name}&client_email={email}&affiliate_commission={amount_affiliate}.

![](https://storage.crisp.chat/users/helpdesk/website/626e5bed518e1800/image_iso8yj.png)

### Activation and notifications

Last but not least, you will need to activate the key to ensure that the integration is turned on and working.

You can also include an email address to receive notifications in case of errors when sending postbacks to the configured URL.

![](https://storage.crisp.chat/users/helpdesk/website/626e5bed518e1800/image_1qu3fah.png)

# Step Three: Testing the Integration

In this step, with your integration already configured and saved, we will validate the connection with your *postback URL* to ensure that everything is ready to run marketing campaigns.

### Testing the connection

1. You will need to access the integration again under [Admin > Tracking & Scripts> S2S Tracking](https://accounts.cartpanda.com/settings/pixels).

2. Click on the title of the integration you want to test.

![](https://storage.crisp.chat/users/helpdesk/website/626e5bed518e1800/image_h8dsrk.png)

3. At the bottom of the page, click on the “Test connection” button and a pop up will open.

![](https://storage.crisp.chat/users/helpdesk/website/626e5bed518e1800/image_472lvr.png)

4. Here you can insert the *promolink* provided by your marketing platform with the *click ID*, or you can insert a checkout link for your product in Cartpanda including a *click ID* at the end: `?cid=some-click-id`.

— **Attention**: some marketing platforms will only return success in the connection test if you use the *promolink* with a valid *click ID* provided by them.

![](https://storage.crisp.chat/users/helpdesk/website/626e5bed518e1800/image_wcgdjg.png)

5. Click test and check the result.

**a.** If everything is ok, a success message will be displayed on the screen.
**b.** If there is a problem with the *postback URL*, the technical error will be displayed.

### Testing with Orders

After ensuring that the connection is functional, you can fully validate the integration by performing an end-to-end test, i.e., you will open the *promolink* as a customer and complete a purchase on Cartpanda.

To place test orders on Cartpanda, you must [follow these instructions](https://help.cartpanda.com/en-us/article/how-to-use-test-mode-1vj43ti/).

# List of parameters for S2S Postback URL

| **Information** | **Parameter** | **Description** | **Example** |
| ---- | ---- | ---- | ---- |
| **Click ID** | {cid} | The ID used by your tracking system to attribute the purchase to a specific click. | e.g., 123456789 |
| **Campaign Key** | {campaignkey} | In each promotional link, you can include a campaign key to differentiate campaigns later. | e.g., Facebook Campaign |
| **Country** | {country} | The country where the purchase was made, based on the buyer's IP address. | e.g., Germany |
| **Affiliate Amount** | {amount_affiliate} | The amount the affiliate earns from the sale. | e.g., €15.03 |
| **Currency** | {currency} | The currency in which the product was purchased. | e.g., EUR |
| **Product ID** | {product_id} | The ID of the product purchased. | e.g., 62686 |
| **Product Name** | {product_name} | The name of the product purchased. | e.g., Caffeine Capsule |
| **Order Type** | {order_type} | Indicates the role of the product in this sales funnel. | initial_sale, upsell |
| **Upsell Position** | {upsell_no} | Indicates the position of the product in the sales funnel. | e.g., 3 (= third upsell) |
| **Store Slug** | {shop_slug} | The store identifier in Cartpanda. | e.g., your-store |
| **Affiliate Slug** | {affiliate_slug} | The affiliate identifier in Cartpanda. | e.g., AnnasShop |
| **Affiliate Code** | {afid} | The product's affiliate code for an affiliate. | e.g., gmHk9k |
| **Test Payment** | {is_test} | Indicates whether this order is a test payment. | e.g., 1 (= test payment) |
| **Date and Time** | {datetime_unix}{datetime_full}{datetime_utc} | Date and time, available in three formats. | e.g., 1570216877 |
| **Random Text** | {random} | A randomly generated string (to avoid potential caching issues). | e.g., 2nc91mx82 nv912kcx81be8c |
| **Email** | {email} | The email address of the customer who purchased the product. | e.g., customer@mail.com |
| **First Name** | {first_name} | The first name of the customer who purchased the product. | e.g., José |
| **Last Name** | {last_name} | The last name of the customer who purchased the product. | e.g., Souza |
| **Phone** | {phone_number} | The phone number of the customer who purchased the product | e.g., 5511999119988 |