Postbacks are configured on the side of the advertiser - in a personal account or through a personal manager. Postback samples you can get on the redirect site settings page.

Postback basis: click ID

The most important element of postback is the identifier of the click. Before configuring postback, you need to find out exactly how it looks in your case. It can be found in the postback documentation.

Most often, the macro for the click ID will be the same as the parameter we used in redirect URL, but in curly brackets. For example, in the link it is specified as sub1={click}, it means in postback it will be click={sub1}.

The easiest option: ask the desired macro at your personal manager in the target network. If it is missing - refer to the documentation.

Further on the text, we believe that the macro for click ID looks like {click}, and macros for other parameters are also used in curly brackets.

SOI postback

The easiest postback that creates a confirmed Leed. Used in dating offers, with payment on the site, in applications with payment for registration.

General view of SOI postback:

https://domain.com/api/site/click.json?token=12-abc&click={click}&accept=1

The accept=1 parameter is responsible for automatic confirmation of the lead at the time it is received. You can work without it and check "Automatically approve all incoming leads" in the offer settings option - action will be the same.

DOI postback

Postback pair is used: the first creates a waiting lead, the second approves it. The most popular option. Used in offers with confirmed registration, payment for the first deposit, the achievement of a baseline or any other option in which the profile is approved after registration.

Create lead postback: "Registration"

https://domain.com/api/site/click.json?token=12-abc&click={click}

Approve lead postback: "Deposit"

https://domain.com/api/site/status.json?token=12-abc&click={click}&status=approve&auto=1

The status=approve parameter is responsible for approving the previously created Leed. The auto=1 parameter is responsible for creating new lead if for some reason registration postback was lost (shit happens).

Please note: postback on the creation of head uses the click function, postback to change the lead status - to the status function.

Postback with status

This is the expansion of the DOI-postback option. A pair of or several postback is used. Postback to the lead creation (registration) and its approve (deposit) remain the same. A couple of new postbacks is added:

Valid lead cancellation postback: "Cancel"

https://domain.com/api/site/status.json?token=12-abc&click={click}&status=cancel&auto=1

Invalid lead cancellation postback: "Trash"

https://domain.com/api/site/status.json?token=12-abc&click={click}&status=trash&auto=1

In the status parameter, you can transmit a variety of values, the automation will try to recognize them and translate them to the appropriate status. You can use the {status} macro on the target network side in combination with the status parameter.

Postback with smart status change by macro:

https://domain.com/api/site/status.json?token=12-abc&click={click}&status={status}&auto=1

Adding commission amount

You can receive the commission amount for the affiliate directly in postbeck. To do this, add the wm parameter with the amount of commission and cc with the ISO code of the commission currency.

Postback with the commission:

https://domain.com/api/site/click.json?token=12-abc&click={click}&wm={payout}&cc={currency}

Commission amount can be added both to the postback of status changes and the postback of the lead creation.

Please note: if the payment is transmitted in postback, it overwrites the payment that is determined by the system. To set the affiliate network commission, use "manual payments".

Adding country

Sometimes the amount of commission depends on the country, and the country on the side of the target network is determined by the phase of the fifth moon of Saturn. You can add the country parameter in postback with the ISO code of the recipient country.

Postback example with country code:

https://domain.com/api/site/click.json?token=12-abc&click={click}&country={geo}

Using the exact indication of the country, you will not need to use manual payments settings.

Adding order price

Important! Order price is not the amount of commission. This is the amount of the invoice for commodity leads or the amount of the deposit. With the price of the order, percent commissions may be calculated.

Postback example with lead price:

https://domain.com/api/site/click.json?token=12-abc&click={click}&base={price}&currency={currency}

The base is used for the invoice amount, the currency parameter receives currency ISO code.

Global postback

Sometimes you need to connect several offers, but you can only set one postback for all. In this case, the global key for postback is useful. Go to Control - Settings - Sites. Closer to the bottom of the page find "Global API key" in the "Technical settings" block. Put it in the token parameter in the postback URL.

For example, it was:

token=123-2fc78e4643ec1f8b6a8039e09d39dcc3

We change it to::

token=jkUYwu9EBECEolXfnL9GIuwgiOJiB0rG

Numbers and dash are also removed. There is only a key of a strange set of characters.

Checking postbacks

After setting up postbacks, it is recommended to check if they work correctly. To do this, go to Control - Settings - API Requests. Here select search by application site. You are interested in the click and status functions. You can find the requests you need by specifying the ID of the site for which the postback was created.

Life hack for global postbacks: you can add a z parameter to the postback with an arbitrary value. For example, specify in it the name of the affiliate network with which you work. The search for the z parameter is performed through the Tag field. However, the use of the tag is recommended for any postbacks.

Postback example with tag:

https://domain.com/api/site/click.json?token=12-abc&click={click}&z=BestNetwork