Publisher Integration Documentation

Use this guide to add the hosted offerwall on your own website, receive the sender call on your server, verify the signature, block duplicate transactions, and understand how external network callbacks are processed on our side.

App Details Hosted Wall Postback

1. Publisher Setup Flow

  1. Create a publisher account.
  2. Add your website/app in the publisher panel.
  3. Fill app name, website URL, category, traffic details, currency name, points per USD, and your own postback URL.
  4. Wait for admin approval. After approval your API key and secret become active.
  5. Use the hosted offerwall route with your own user ID from your website.
  6. When a user completes an offer, task, PTC, shortlink, or article, our server saves the conversion and then fires a sender call to your postback URL.

2. Hosted Offerwall Integration

The simplest integration is the hosted route below. Replace USER123 with the current logged-in user ID from your own website or app.

Pretty Route
https://adflixy.com/offerwall/YOUR_APP_API_KEY/USER123
PHP Route
https://adflixy.com/offerwall.php/YOUR_APP_API_KEY/USER123
JavaScript
window.open("https://adflixy.com/offerwall/YOUR_APP_API_KEY/USER123", "_blank");
iFrame
<iframe style="width:100%;height:800px;border:0;padding:0;margin:0;" scrolling="yes" frameborder="0" src="https://adflixy.com/offerwall/YOUR_APP_API_KEY/USER123"></iframe>
PHP Button Example
<?php
$userId = $loggedInUser['id'];
$offerwallUrl = "https://adflixy.com/offerwall/YOUR_APP_API_KEY/" . urlencode($userId);
echo '<a href="' . htmlspecialchars($offerwallUrl) . '" target="_blank">Open Offerwall</a>';
?>

The hosted wall creates a publisher-user context using your app API key and your user ID.

3. How Reward and Sender Call Work

StepWhat happens
1User opens the hosted wall from your website.
2User completes an offer or internal module.
3Our system receives the callback or internal claim event.
4We apply admin share and convert the final reward into your app currency using your own points_per_usd setting.
5We store the conversion under your publisher app and user ID.
6We send a sender call to your postback URL so your own website can credit the user.

4. Sender Call Parameters

These are the parameters your website should accept on your own postback URL.

ParameterDescriptionExample
subId / subidYour own user IDUSER123
transId / transid / txidUnique transaction IDtx_demo_1001
rewardFinal amount to credit in your currency7.0000
reward_nameYour currency namePoints
reward_valueHow many units equal 1 USD on your app10000.00
payoutUSD value recorded for the conversion0.001000
offer_nameOffer titleDemo Offer
offer_typeoffer, ptc, task, article, shortlinkoffer
offer_idOffer identifier if available55
network_nameSource networkNotik
publisher_idYour publisher ID in our systemPUB_ID
app_idYour app ID in our systemAPP_ID
local_user_idYour local user id if passed during launchLOCAL123
external_user_idMapped hosted user IDUSER123
userIpUser IP39.34.100.10
country / city / regionLocation data when availablePK / Karachi / Sindh
device_typedesktop, mobile, tabletmobile
browser_nameBrowser nameChrome
status1 = credit, 2 = reverse1
debug0 = live, 1 = test0
signatureMD5(subId + transId + reward + secret)calculated by your secret

5. Example Sender URL

https://your-site.com/postback.php?subId=USER123&subid=USER123&transId=tx_demo_1001&transid=tx_demo_1001&txid=tx_demo_1001&reward=7.0000&reward_name=Points&reward_value=10000.00&payout=0.001000&offer_name=Demo+Offer&offer_type=offer&offer_id=55&network_name=Notik&publisher_id=PUB_ID&app_id=APP_ID&local_user_id=LOCAL123&external_user_id=USER123&userIp=39.34.100.10&country=PK&city=Karachi&region=Sindh&device_type=mobile&browser_name=Chrome&status=1&debug=0&signature=ef0ab4926fa6579606e8a35594437c90

6. Example Receiver File for Publisher Website

Create a file like postback.php on your own website and set its URL in your app settings.

<?php
require __DIR__ . '/db.php';

$secret = 'YOUR_APP_API_SECRET';
$subId = (string)($_GET['subId'] ?? $_GET['subid'] ?? '');
$transId = (string)($_GET['transId'] ?? $_GET['transid'] ?? $_GET['txid'] ?? '');
$reward = (string)($_GET['reward'] ?? '0');
$status = (string)($_GET['status'] ?? '1');
$signature = (string)($_GET['signature'] ?? '');

if ($subId === '' || $transId === '' || $reward === '') {
    http_response_code(422);
    exit('missing');
}

$expected = md5($subId . $transId . $reward . $secret);
if (!hash_equals(strtolower($expected), strtolower($signature))) {
    http_response_code(403);
    exit('bad-signature');
}

$stmt = $pdo->prepare('SELECT id FROM postback_history WHERE txid = ? LIMIT 1');
$stmt->execute([$transId]);
if ($stmt->fetchColumn()) {
    exit('duplicate');
}

$points = (float)$reward;
$userStmt = $pdo->prepare('UPDATE users SET balance = balance + ? WHERE id = ? LIMIT 1');
$userStmt->execute([$status === '2' ? -$points : $points, $subId]);

$logStmt = $pdo->prepare('INSERT INTO postback_history (user_id, txid, reward, status, raw_data, created_at) VALUES (?,?,?,?,?,NOW())');
$logStmt->execute([$subId, $transId, $points, $status, json_encode($_GET)]);

echo 'ok';
?>

Important: always block duplicate transaction IDs and always verify the signature before crediting the user.