Configure app-specific postback URLs to receive conversion notifications.
App-level postbacks allow you to set a unique postback URL for each of your apps or websites. When a user completes an offer, we'll send a server-to-server notification to your specified URL with conversion details.
To set up app postback:
Your postback URL should accept GET requests with the following parameters as macros:
https://your-domain.com/postback?user={user_id}&txn={transaction_id}&amount={payout}¤cy={currency}
| Macro | Description | Example Value |
|---|---|---|
{user_id} |
Your user ID that was passed to the offerwall | USER123 |
{transaction_id} |
Unique transaction identifier | TXN_abc123def456 |
{offer_id} |
The offer ID that was completed | 12345 |
{offer_name} |
Name of the completed offer (URL encoded) | Complete%20Survey |
{payout} |
Reward amount in USD | 0.50 |
{reward} |
Reward amount in your app's currency | 0.46 |
{ip} |
User's IP address | 192.168.1.1 |
{country} |
User's country code | US |
{device} |
User's device type | US |
{status} |
Conversion status (approved, pending, reversed) | approved |
{aff_sub} |
Custom sub ID added to the offerwall link | null |
{aff_sub2} |
Custom sub ID added to the offerwall link | null |
{aff_sub3} |
Custom sub ID added to the offerwall link | null |
{aff_sub4} |
Custom sub ID added to the offerwall link | null |
https://example.com/postback?uid={user_id}&txn={transaction_id}&amount={payout}
https://api.example.com/conversions?
user={user_id}&
transaction={transaction_id}&
offer={offer_id}&
reward={payout_local}&
device={device}&
status={status}
Your server should respond with:
1.2.3.4, 5.6.7.8
You can test your postback URL directly from your app's integration page using the "Test Postback" button. This sends a test conversion with sample data.
<?php
// postback.php
$user_id = $_GET['user_id'] ?? null;
$transaction_id = $_GET['transaction_id'] ?? null;
$payout = $_GET['payout'] ?? 0;
$currency = $_GET['currency'] ?? 'USD';
if ($user_id && $transaction_id) {
// Credit user account
creditUserBalance($user_id, $payout, $currency);
// Log transaction
logTransaction($user_id, $transaction_id, $payout);
// Return success
http_response_code(200);
echo "OK";
} else {
http_response_code(400);
echo "Missing parameters";
}
?>