Integrate our offerwall into your website with our comprehensive guide. Fast, secure, and developer-friendly.
Welcome to the Adlexy documentation. Follow this guide to integrate our offerwall quickly and securely.
Register your website to get API credentials and start integrating our offerwall.
Access your Adlexy dashboard
Click "Add Website" in the sidebar
Set currency, rates, and postback URL
Wait for approval and get your API keys
Our offerwall automatically adapts to any screen and shows relevant offers to your users.
Find this option in your dashboard sidebar
Copy your API Key and Secret Key from website settings
Use the code snippet provided below
<iframe
style="width:100%; height:800px; border:0; padding:0; margin:0;"
scrolling="yes"
frameborder="0"
src="https://adlexy.com/offerwall/[API_KEY]/[USER_ID]">
</iframe>
[API_KEY] with your website API key and
[USER_ID] with your user's unique identifier.
| Parameter | Description | Type |
|---|---|---|
[API_KEY] |
Your unique API key from website settings | varchar(32) |
[USER_ID] |
Unique identifier for your user | varchar(32) |
We send HTTP POST requests to your server when users complete offers.
| Parameter | Description | Example |
|---|---|---|
subId |
Your user's unique identifier | user123 |
transId |
Unique transaction ID | TRX-12345678 |
reward |
Amount to credit (your currency) | 1.25 |
payout |
The revenue generated from the offer completion. | 1.50 |
reward_name |
The name of the currency being rewarded. | Points |
offer_name |
The name of the offer. | Test Offer |
offerid |
The ID of the offer. | OFFER123 |
userIp |
The IP address of the user who completed the offer. | 123.123.123.123 |
country |
The user's country code (e.g., US, GB, etc.). | US |
status |
Transaction status (1=valid, 2=chargeback) | 1 |
debug |
A debug flag. 0 for production. |
1 |
signature |
Security verification hash | 17b4e2a70d6efe9796dd4c5507a9f9ab |
reward parameter is always positive. Check the status parameter to determine whether to add or subtract from user balance.
Always verify the signature to ensure requests come from our servers:
$secret = "YOUR_SECRET_KEY"; // From your website settings
$subId = $_POST['subId'] ?? '';
$transId = $_POST['transId'] ?? '';
$reward = $_POST['reward'] ?? '';
$signature = $_POST['signature'] ?? '';
// Verify signature
if (md5($subId . $transId . $reward . $secret) !== $signature) {
http_response_code(403);
echo "ERROR: Invalid signature";
exit;
}
echo "ok"; // Important: Always respond with "ok"
// postback_handler.php
$secret = "YOUR_SECRET_KEY";
// Get POST data
$userId = $_POST['subId'] ?? '';
$transId = $_POST['transId'] ?? '';
$reward = floatval($_POST['reward'] ?? 0);
$status = intval($_POST['status'] ?? 0);
$signature = $_POST['signature'] ?? '';
// Verify signature
if (md5($userId . $transId . $reward . $secret) !== $signature) {
http_response_code(403);
echo "ERROR: Invalid signature";
exit;
}
// Handle chargebacks
if ($status === 2) {
$reward = -abs($reward); // Subtract for chargebacks
}
// Check if transaction is new
if (isNewTransaction($transId)) {
// Credit user balance
creditUser($userId, $reward, $transId);
}
// Always respond with "ok"
echo "ok";