Developer Documentation

Integrate our offerwall into your website with our comprehensive guide. Fast, secure, and developer-friendly.

Quick Setup Secure Integration High Performance

Getting Started

Welcome to the Adlexy documentation. Follow this guide to integrate our offerwall quickly and securely.


Add Your Website

Register your website to get API credentials and start integrating our offerwall.

1. Login to Your Account

Access your Adlexy dashboard

2. Add Website

Click "Add Website" in the sidebar

3. Configure Settings

Set currency, rates, and postback URL

4. Get Approved

Wait for approval and get your API keys


Integration Guide

Our offerwall automatically adapts to any screen and shows relevant offers to your users.

Important: You must register your website first to get API credentials before proceeding with integration.
Integration Steps:
  1. 1.
    Navigate to "My Websites"

    Find this option in your dashboard sidebar

  2. 2.
    Get Your API Keys

    Copy your API Key and Secret Key from website settings

  3. 3.
    Implement Offerwall Code

    Use the code snippet provided below


Offerwall Implementation

Embed Code
<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>
Replace [API_KEY] with your website API key and [USER_ID] with your user's unique identifier.
Parameters Reference
Parameter Description Type
[API_KEY] Your unique API key from website settings varchar(32)
[USER_ID] Unique identifier for your user varchar(32)

Postback System

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
Note: The reward parameter is always positive. Check the status parameter to determine whether to add or subtract from user balance.

Security & Verification

Signature Verification

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"

Complete Example

// 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";
Success: Your server must always respond with "ok" to confirm receipt of the postback.