⚙️Postback

Embark on a smooth journey towards creating your own Postback as we guide you through every step, offering detailed assistance at each stage.

What The Postback?

When a user successfully completes an offer, we immediately trigger a call to the Postback URL you have provided in your placement. This call contains all the relevant information required to credit your users, serving as a real-time notification to your server.

Postback Macros

MacrosDescriptionExample

{app_name}

Returns the app / placementname

cash app

{userid}

This is the unique identifier code of the user who completed action on your platform.

user1234

{password}

If your postback has a password associated, we pass this password back to you

pbX48=8S

{user_amount}

The amount of your virtual currency to be credited to your user.

900

{offer_name}

Name of completed offer.

TikTok App

{offer_id}

ID of completed offer.

559807

{payout}

The offer payout in $ (USD).

Will be a negative value if lead is reversed.

3.00

{ip_address}

Converting device's IP address if known, 0.0.0.0 otherwise

N/A

{currency_name}

Virtual currency name defined in your app settings.

Coin

{date}

The date on which the offer was completed

2024-04-07

{transactionID}

transaction ID of completed offer.

8aeea67sd

Example Postback URL

https://your-site.com/?userid={userid}&offer_name={offer_name}&user_amount={user_amount}&payout={payout}&ip_address={ip_address}

PHP Example

// Some code
<?php

//php code example
$user_id = $_REQUEST['userid'];
$ip_address = $_REQUEST['ip_address'];
$offer_name = $_REQUEST['offer_name'];
$offer_id = $_REQUEST['offer_id'];
$app_name = $_REQUEST['app_name'];
$user_amount = $_REQUEST['user_amount'];
$payout = $_REQUEST['payout'];
$currency_name = $_REQUEST['currency_name'];
$date = $_REQUEST['date'];
//If your postback has a password associated, we pass this password back to you 
$password = $_REQUEST['password'];
$my_password = "your-postback-password-here";

//Database Connection

$host       = "your-host-server";
$dbuser     = "your-database-username";
$dbpassword = "your-database-password";
$dbname     = "your-database-name";
$db = mysqli_connect($host,$dbuser,$dbpassword,$dbname); 

if (isset($user_id) && $password == $my_password) {
  mysqli_query($db,"INSERT INTO
  leads (user_id , offer_name , offer_id , ip_address , app_name , offer_payout , user_amount , currency_name , date) 
  VALUES ('".$user_id."','".$offer_name."','".$offer_id."','".$ip_address."','".$app_name."','".$offer_payout."','".$user_amount."','".$currency_name."','".$date."')"); 
} 
?>

Last updated