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.
1. Publisher Setup Flow
- Create a publisher account.
- Add your website/app in the publisher panel.
- Fill app name, website URL, category, traffic details, currency name, points per USD, and your own postback URL.
- Wait for admin approval. After approval your API key and secret become active.
- Use the hosted offerwall route with your own user ID from your website.
- 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.
https://adflixy.com/offerwall/YOUR_APP_API_KEY/USER123
https://adflixy.com/offerwall.php/YOUR_APP_API_KEY/USER123
window.open("https://adflixy.com/offerwall/YOUR_APP_API_KEY/USER123", "_blank");<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 $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
| Step | What happens |
|---|---|
| 1 | User opens the hosted wall from your website. |
| 2 | User completes an offer or internal module. |
| 3 | Our system receives the callback or internal claim event. |
| 4 | We apply admin share and convert the final reward into your app currency using your own points_per_usd setting. |
| 5 | We store the conversion under your publisher app and user ID. |
| 6 | We 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.
| Parameter | Description | Example |
|---|---|---|
| subId / subid | Your own user ID | USER123 |
| transId / transid / txid | Unique transaction ID | tx_demo_1001 |
| reward | Final amount to credit in your currency | 7.0000 |
| reward_name | Your currency name | Points |
| reward_value | How many units equal 1 USD on your app | 10000.00 |
| payout | USD value recorded for the conversion | 0.001000 |
| offer_name | Offer title | Demo Offer |
| offer_type | offer, ptc, task, article, shortlink | offer |
| offer_id | Offer identifier if available | 55 |
| network_name | Source network | Notik |
| publisher_id | Your publisher ID in our system | PUB_ID |
| app_id | Your app ID in our system | APP_ID |
| local_user_id | Your local user id if passed during launch | LOCAL123 |
| external_user_id | Mapped hosted user ID | USER123 |
| userIp | User IP | 39.34.100.10 |
| country / city / region | Location data when available | PK / Karachi / Sindh |
| device_type | desktop, mobile, tablet | mobile |
| browser_name | Browser name | Chrome |
| status | 1 = credit, 2 = reverse | 1 |
| debug | 0 = live, 1 = test | 0 |
| signature | MD5(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®ion=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.