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.
Hosted Offerwall

Use the iframe integration if you want the fastest setup with our hosted wall, built-in tracking, and no backend work.

Feed API

Use the Feed API if you want to fetch your active offers directly into your own app or backend while keeping Adlexy click tracking and postbacks.

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)

Feed API Reference

The Feed API returns your website-specific active offers as JSON. It uses the same rates, blocked offers, redirect tracking, and postback flow as the hosted offerwall.

Dedicated API access for publishers who want to build their own offer experience

Use this endpoint if you want to fetch offers into your backend, mobile app, or custom frontend while still relying on Adlexy for click tracking, provider routing, reward calculations, and postbacks.

GET /api/offers.php X-API-Key + X-API-Secret country=all supported os=all supported limit=all supported
GET https://adlexy.com/api/offers.php?sub_id=USER123&country=all&os=all&limit=all
JSON Structured offer feed response
Tracked Clicks still flow through Adlexy redirect tracking
Site-Aware Blocked offers and site custom rates are applied
Flexible Supports country, OS, search, sort, page, and limit filters
Approval required: Feed API access is separate from your normal website API key. Request Feed API access from Member > Websites, then wait for admin approval.
How to enable it
  1. Create and approve your website first.
  2. Open your website in Member > Websites.
  3. Go to the Feed API tab and request access.
  4. After approval, copy your Feed API Key and Feed API Secret.
Endpoint
GET https://adlexy.com/api/offers.php
Every request must include X-API-Key, X-API-Secret, and a non-empty sub_id.
Authentication Headers
Header Required Description
X-API-Key Yes Your website's Feed API key. This is separate from the public iframe API key.
X-API-Secret Yes Your website's Feed API secret used for server-to-server authentication.
Query Parameters
Parameter Required Description Example
sub_id Yes Your end-user identifier. It is attached to click tracking and later postbacks. USER123
country No Two-letter country code like US. Use all to skip country filtering completely. US, all
os No Offer OS filter. Use android, ios, or all for all supported devices. android, all
search No Searches offer name and description. vpn
sort No Accepted values: random, high, low, az. high
page No Page number for paginated requests. Ignored when limit=all. 1
limit No Maximum offers per response. Supports integers up to 200, or all to remove the limit. 50, all
Recommended Request
Full inventory request All countries, all devices, no limit
curl -H "X-API-Key: YOUR_FEED_API_KEY" \
  -H "X-API-Secret: YOUR_FEED_API_SECRET" \
  "https://adlexy.com/api/offers.php?sub_id=USER123&country=all&os=all&limit=all"
Full inventory request: Use country=all&os=all&limit=all if you want all active offers for all countries and all supported devices in one response.
Response Structure
Site block

Includes reward configuration so you can render the feed using the same currency rules as the website.

Pagination block

Returns the resolved page, limit, and count. When you request limit=all, the response shows "limit": "all".

Offer block

Each offer includes display data, goal data, payout values, completion state, and the tracked redirect_url.

Rate limiting

The endpoint applies request throttling per Feed API key and per IP. If exceeded, the API returns 429 with a Retry-After header.

Example successful response Truncated to one offer for readability
{
  "success": true,
  "site": {
    "id": 12,
    "title": "My App",
    "reward_name": "Coins",
    "reward_value": "1000.00",
    "reward_round": 0
  },
  "pagination": {
    "page": 1,
    "limit": "all",
    "count": 29
  },
  "user_balance": "0",
  "offers": [
    {
      "offer_id": "569474",
      "name": "Example Offer",
      "description": "Install and open the app",
      "image_url": "https://cdn.example.com/image.jpg",
      "provider": "Appic",
      "category": "mobile",
      "countries": "US,CA,GB",
      "os": "android",
      "primary_goal": "Install and open the app",
      "goals": [
        {
          "name": "Install and open the app",
          "payout": "1500",
          "revenue": "1.50"
        }
      ],
      "final_payout": "1500",
      "publisher_revenue": "1.50",
      "is_completed": false,
      "redirect_url": "https://adlexy.com/redirect.php?offer_id=569474&key=PUBLIC_API_KEY&sub_id=USER123&api=QXBwaWM%3D"
    }
  ]
}
Important Behavior
Offer filtering

The Feed API only returns offers available to that website after applying active provider status, blocked offers, and custom site rates.

Click tracking

Use the returned redirect_url for clicks. Do not send users directly to provider links.

Postbacks

Your existing postback URL, signature verification, and chargeback handling do not change.

Infrastructure

If your domain uses a CDN or WAF challenge, exclude /api/offers.php from browser challenges so your backend can access it reliably.

Error Responses
HTTP Status When it happens Example
401 Missing Feed API credentials. {"success":false,"error":"Missing API credentials."}
422 Missing sub_id. {"success":false,"error":"Missing sub_id."}
403 Invalid, inactive, or revoked Feed API credentials. {"success":false,"error":"Invalid or inactive feed API credentials."}
429 Too many requests from the same Feed API key or IP in a short time window. {"success":false,"error":"Too many requests. Please retry in 60 seconds."}

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.