Guidelines on postback settings for CPA campaigns

Fixed cost or interest

 

When creating a promotional CPA campaign, you will have to specify the type of target for which the blogger will get a reward.

 

To do this, when creating a campaign (while creating the content) display the address of the page promoted.

 

Further on, on the targeting page, specify the reward for the target – no less than 1 $ (a fixed rate or interest).

Parameters included in the link

 

When the blogger places your link, it will be expanded with a special key pmkey (pmkey, which is the blogger's application id – nearly similar to the blogger's id). This key will be used to identify the blogger who is to get rewarded for completing the target.

 

Besides, the link will automatically get expanded with the utm_source=postmarket, parameter so that the advertiser could see visits to the website (from the PostMarket promotion) and, if chooses so, could see it in his/her metrics.

 

The link will automatically get expanded with the parameter utm_campaign=10494, 10494 - is the advertiser's campaign id in the account (in the campaign), and it is also used as the above-described parameter, as well as to check in the account (in the campaign) which promotional campaign belongs to which link (this is to ensure convenience when more than 1 campaign are underway at the same time).

 

Here below is an example of the way a visit to the website will look like with the link indicated in the campaign https://website.com - the blogger will the link changed to https://postmarket/cpa/11111 (11111 - application id) and once they enter the website it will look like: https://website.com?pmkey=1111&utm_source=postmarket&utm_campaign=10494

Parameter setting in postback and postback url generation

 

pmkey - get parameter coming to the promoted page from the blogger.

 

secretkey - is in the advertiser's account (on the Profile page, next to the "secret key" avatar), e.g.: 5a94e4fb-58cb-4128-8224-8b3d46244823).

 

sum - is used in case you want to use interest from sales. Here the sales sum is to be indicated, while the interest is to be set up in the account (campaign settings).

 

hash - md5(secretkey + pmkey) concatenation with no gap. The transmitted parameter that contained encrypted data.

 

md5 - is a function for encrypting that is used to generate secretkey + pmkey in hash for sending.

Example of a postback link

When completing an target on your website, the postback has to be sent to the url.

 

Fixed price: https://postmarket.pro/api/cpa/postback?pmkey=11111&hash=md5(secretkey+pmkey)

 

Interest: https://postmarket.pro/api/cpa/postback?pmkey=11111&hash=md5(secretkey+pmkey)&sum=1000

Sample well-generated link: https://postmarket.pro/api/cpa/postback?pmkey=11111&hash=4051c6027e76bb44f70c1cb6bbff4b49

hash - this got through md5 concatenation 5a94e4fb-58cb-4128-8224-8b3d4624482311111, where 11111 - pmkey and 5a94e4fb-58cb-4128-8224-8b3d46244823 - secretkey.

Using tracker from the advertiser

For cases where the advertiser needs to use the tracker, it is to be specified in the promotional campaign link and is expanded with the pmkey.

Complete code (how it works)

The advertiser can use our prepared code (functions with fixed price only) on the website, either on the server side (preferably) or on the client's side (not so recommended). Besides, this code will help the advertiser make a similar one.

Index has to be placed on the website page where the visitor is referred first: Index.js (github).

Postback has to be located on the page that is considered as an target (e.g., the "Thank you" page, on which the target is placed): Postback.js (github).

Postback sending errors

Response comes as json:

{
"Success": true, 
"ServerTime": "2021-01-21T16:41:39.6310465+03:00", 
"Error": null, 
"ErrorCode": 0, 
"Data": true
}

hash invalid: hash = md5(secretkey + pmkey) - incorrectly made hash с secretkey + pmkey.

pmkey invalid - incorrect pmkey (this is just used in another campaign), it has to be taken not from examples in the guide yet to be obtained from the manager for tests.

pmkey not found - incorrect pmkey (this one just does not exist), it has to be taken not from examples in the guide yet to be obtained from the manager for tests

Campaign is not CPA kind - the created campaign is not a cpa one, so it cannot function with postback.

Campaign is not running (not started or budget spent) - the campaign has not been launched for tests.

[reward] or [sum] required - the parameter for work with % is not used in postback.

Если Success = false, the error in the field has to be eliminated Error with a notification sent again until it is successful.

Postback test

Postback may be tested with no pay for campaign or balance refill by the advertiser.

 

The advertiser creates a promotional campaign and offers a link to the website.

 

Postback is set up on the advertiser's website.

 

The test account accepts the campaign and the advertiser gets the pmkey to test the postback.

 

The advertiser can check the postback by following the conditions indicated for the target, and then ask the manager if the postback has arrived, or the advertiser can let the manager know under what conditions the postback is supposed to arrive, and then the manager will check it.

 
 

Once the postback arrives successfully, the campaign can be paid (if not paid yet) and be launched for bloggers.

Should you have any questions or lack experts who could set up the postback, we can help you. Just contact our support team on the website (will have to get through the registration procedure) or Telegram us (+79620269679).