Documentation
Getting Started
Welcome to the Offerlite documentation. Bellow you will find all required informations to integrate our offerwall into your website in just few minutes.
Before integrating our offerwall, make sure you're registered on our website, account is required to use any of our tools.
Add your Website
To be able to integrate our offerwall, first you have to add your website. Once you have added your website you will have an API KEY and a SECRET KEY, that you will need to integrate our offerwall.
To register your website into our service, please follow these steps:
- Login to your Offerlite account.
- You should now see the Add Website button at sidebar. Click this button to add your first website.
- Set your Website Name, Domain Name and application type (platform) and proceed to next step.
- Set your Currency Name in plural form (e.g. Points, Tokens, Coins...), Currency Round (the number of decimals your currency can have, up to 2 decimals) and Exchange Rate (how many of your website currency units will a user earn for every 1 USD that we will pay you).
- Set your Postback URL. Whenever a user completes an offer, we will make a call to this URL by sending all the information needed to help you to credit the virtual currency to your users.
- Done! You have add your website, one of our team members will review it and once it is approved you will receive an email in the meantime you can continue with the integration process. You will find more informatons about postback integration in next chapters of this documentation.
Integrate Offerwall
Our Offerwall enables users to benefit from incentives and rewards thanks to segmented, automatically translated ads. Our offerwall will adapt to any screen and will show offers to your users.
Before being able to integrate our offerwall, you must register your app first. Once you have registered your app you will have an API KEY and a SECRET KEY, that you will need in the following steps.
- Click on My Apps button on sidebar.
- From your app list, you can get your API and Secret keys, anyway if you click Api Keys button on any of your apps you will be able to get your api keys.
Offerwall Code
<iframe style="width:100%;height:800px;border:0;padding:0;margin:0;" scrolling="yes"
frameborder="0" src="https://offerlite.xyz/offerwall/?userid=[USER_ID]&key=[API_KEY]"></iframe>
Replace [API_KEY] with your website api key and [USER_ID] by the unique identifier code of the user of your site who is viewing the wall.
| Parameter | Description | Value |
|---|---|---|
[API_KEY] |
Unique API Code provided when you registered your website | varchar(32) |
[USER_ID] |
Unique identifier code of the user of your site | varchar(32) |
Postback Notifications
Whenever a user complete an offer, we will make a call to the Postback URL that you indicated in your app attaching all the information that you will need to credit your users.
Our server will make a HTTP GET request to your server including all of the following parameters.
| Parameter | Description | Example |
|---|---|---|
{{userId}} |
This is the unique identifier code of the user who completed action on your platform. | user123 |
{{transactionId}} |
Unique identification code of the transaction made by your user. | XX-12345678 |
{{rewardValue}} |
The amount of your virtual currency to be credited to your user. | 1.25 |
{{payout}} |
The offer payout in USD | 0.100000 |
{{userIp}} |
The user's IP address who completed the action. | 192.168.1.0 |
{{countryCode}} |
Country (ISO2 form) from the lead comes. | US |
{{status}} |
1=valid, 2=invalid (chargeback) | 1 |
{{type}} |
game, ptc, shortlink, offers | game |
{{secret}} |
MD5 hash that can be used to verify that the call has been made from our servers. It's call signature Also. | 17b4e2a70d6efe9796dd4c5507a9f9ab |
Postback Security
You should verify the signature received in the postback to ensure that the call comes from our servers.
Signature parameter should match MD5 of subId transactionId reward secret key. You can find your Secret Key of your website in My Apps section.
The formula to be checked is as follows:
<?php
$secret = ""; // Get your secret key from Offerlite
$subId = isset($_GET['subId']) ? $_GET['subId'] : null;
$transId = isset($_GET['transId']) ? $_GET['transId'] : null;
$reward = isset($_GET['reward']) ? $_GET['reward'] : null;
$signature = isset($_GET['signature']) ? $_GET['signature'] : null;
$status = isset($_GET['status']) ? $_GET['status'] : null;
// Validate Signature
if(md5($subId.$transId.$reward.$secret) != $signature)
{
echo "ERROR: Signature doesn't match";
return;
}
?>
Our servers wait for a response for a maximum time of 60 seconds before the timeout. In this case, postback will be marked as failed. Please, check if the transaction ID sent to you was already entered in your database, this will prevent to give twice the same amount of virtual currency to the user.
IPs to whitelist
We will be sending the postbacks from any of the following IP addresses. Please make sure they are whitelisted if needed to be in your server.
199.188.201.205Respond to Postback
Our servers will expect your website to respond with "ok". If your postback doesn't return "ok" as response, postback will be marked as failed (even if postback was successfully called) and you will be able to resend it manually from our website.
Postback Example
The following example is not a working one but should be enough to understand how you should implement your postback in your website.
<?php
$secret = ""; // Get your secret key from Offerlite
// Proceess only requests from Offerlite IP addresses
$allowed_ips = array('199.188.201.205');
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$IP = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$IP = $_SERVER['REMOTE_ADDR'];
}
if(!in_array($IP, $allowed_ips))
{
echo "ERROR: Invalid source";
return;
}
// Get postback variables
$userId = isset($_GET['subId']) ? $_GET['subId'] : null;
$transId = isset($_GET['transId']) ? $_GET['transId'] : null;
$reward = isset($_GET['reward']) ? $_GET['reward'] : null;
$payout = isset($_GET['payout']) ? $_GET['payout'] : null;
$ipuser = isset($_GET['userIp']) ? $_GET['userIp'] : "0.0.0.0";
$country = isset($_GET['country']) ? $_GET['country'] : null;
$signature = isset($_GET['signature']) ? $_GET['signature'] : null;
$status = isset($_GET['status']) ? $_GET['status'] : null;
// Validate signature
if(md5($userId.$transId.$reward.$secret) != $signature)
{
echo "ERROR: Signature doesn't match";
return;
}
// Add or substract the reward
if($status == 2)
{
// 2 = Chargeback, substract reward from user
$reward = -abs($reward);
}
// Check if the transaction is new, use $transId to valiate it
if(isNewTransaction($transId))
{
// Transaction is new, reward your user
processTransaction($userId, $reward, $transId);
}
else
{
// This transaction already exist
}
echo "ok"; // Important!
?>
Intregrate Offerwall on Best Faucet Scripts
We have provide you some Best Faucet scripts intregartion method here,with this tutorial any faucet owner can easyly intregrate on there script
Vie Faucet V4.4.2 Integration
It takes only three steps to integrate Offerlite offerwall into your VieFaucet script.Please find below steps.
First open file - application/controllers/wh.php and enter the following code before last closing bracket (}).
💡
Do not forget to enter your secret key under variable $secret from the Offerlite's dashboard.
Otherwise,your users will not be credited properly since postback will not work.
public function offerlite()
{
$secret = ""; // UPDATE YOUR SECRET KEY
$hold = 1; // UPDATE HOLD DAYS IF YOU USE HOLD
$minHold= 0.1; // Reward Lower than this amount will not be hold
$userId = isset($_GET['subId']) ? $this->db->escape_str($_GET['subId']) : null;
$transactionId = isset($_GET['transId']) ? $this->db->escape_str($_GET['transId']) : null;
$reward = isset($_GET['reward']) ? $this->db->escape_str($_GET['reward']) : null;
$userIp = isset($_GET['userIp']) ? $this->db->escape_str($_GET['userIp']) : "0.0.0.0";
$signature = isset($_GET['signature']) ? $this->db->escape_str($_GET['signature']) : null;
$status = isset($_GET['status']) ? $this->db->escape_str($_GET['status']) : null;
if (md5($userId . $transactionId . $reward . $secret) != $signature) {
echo "ERROR: Signature doesn't match";
return;
}
$reward = $reward * $this->data['settings']['currency_rate'];
$trans = $this->m_offerwall->getTransaction($transactionId, 'offerlite');
if (!$trans) {
$hold = 0;
if ($reward > $minHold) {
$hold = 1; // UPDATE HOLD DAYS Which you Use for hold
}
if ($status == 2) {
$this->m_offerwall->reduceUserBalance($userId, abs($reward));
$this->m_offerwall->insertTransaction($userId, 'offerlite', $userIp, $reward, $transactionId, 1, time());
echo "OK";
} else {
if ($hold == 0) {
$offerId = $this->m_offerwall->insertTransaction($userId, 'offerlite', $userIp, $reward, $transactionId, 2, time());
$this->m_offerwall->updateUserBalance($userId, $reward);
$this->m_core->addNotification($userId, currencyDisplay($reward, $this->data['settings']) . " from offerlite Offer #" . $offerId . " was credited to your balance.", 1);
$user = $this->m_core->getUserFromId($userId);
$this->m_core->addExp($user['id'], $this->data['settings']['offerwall_exp_reward']);
if (($user['exp'] + $this->data['settings']['offerwall_exp_reward']) >= ($user['level'] + 1) * 100) {
$this->m_core->levelUp($user['id']);
}
} else {
$availableAt = time() + $hold * 86400;
$offerId = $this->m_offerwall->insertTransaction($userId, 'offerlite', $userIp, $reward, $transactionId, 0, $availableAt);
$this->m_core->addNotification($userId, "Your offerlite Offer #" . $offerId . " is pending approval.", 0);
}
echo "OK";
}
} else {
echo "DUP";
}
}
Second step is to add our offerwall in the UI. Inside application/controllers/offerwall.php file, add this code before last closing bracket (}).
Don't forget to place on proper place your API key from the dashboard under $api_key variable.
public function offerlite()
{
$api_key=""; // UPDATE YOUR API KEY HERE
$this->data['page'] = 'Offerlite Offerwall';
$this->data['iframe'] = '<iframe style="width:100%;height:800px;border:0;padding:0;margin:0;" scrolling="yes" frameborder="0" src="https://offerlite.xyz/offerwall?userid=' . $this->data['user']['id'] . '&key=' . $api_key . '"></iframe>';
$this->data['wait'] = 3; // UPDATE YOUR HOLD TIME
$this->render('offerwall', $this->data);
}
Third step is to add offerlite offerwall inside your sidebar/ UserPanel Menu on Vie Faucet.
Go to this file application/views/user_template/template.php,
and place this code above or under some of the existing offerwalls list.
<li><a href="<?= site_url('offerwall/offerlite') ?>" key="t-Offerlite">Offerlite</a></li>
Final Step You must Add below code on your config files
Open Application/Config/config.php
Goto $config['csrf_exclude_uris'] this line
Add this code 'wh/offerlite', on that line.
How to set site on offerlite?
PostBack URL Should be : https://yourdomain.com/wh/offerlite?subId={{userId}}&transId={{transactionId}}&reward={{rewardValue}}&payout={{payout}}&status={{status}}&userIp={{userIp}}&type={{type}}&signature={{secret}}&status={{status}}
CryptoFaucet/ClaimBits Integration
ClaimBits/CryptoFaucet is a Very populer of Crypto Faucet which brings plenty of different features together into a complete system.
Excentiv integration is very easy in this script - Just need to create 1 file, Modify 2 line of code, and that’s it! Less than 5 minutes and you can bring offerlite offerwall to your users.
To create Postback file - open system/gateways/ and create file offerlite.php, put following code in this file:
<?php
define('BASEPATH', true);
require('../init.php');
$secret = "YOUR SECRET KEY"; //Enter Your offerlite SECRET KEY
$userId = isset($_GET['subId']) ? $db->EscapeString($_GET['subId']) : null;
$survey = isset($_GET['transId']) ? $db->EscapeString($_GET['transId']) : null;
$reward = isset($_GET['reward']) ? $db->EscapeString($_GET['reward']) : null;
$payout = isset($_GET['payout']) ? $db->EscapeString($_GET['payout']) : null;
$userIP = isset($_GET['userIp']) ? $db->EscapeString($_GET['userIp']) : '0.0.0.0';
$country = isset($_GET['country']) ? $db->EscapeString($_GET['country']) : null;
if (md5($userId.$survey.$reward.$secret) != $_GET['signature']){
echo "ERROR: Signature doesn't match";
return;
}
if(!empty($userId) && $db->QueryGetNumRows("SELECT * FROM `completed_offers` WHERE `survey_id`='".$survey."' LIMIT 1") == 0)
{
$user = $db->QueryFetchArray("SELECT `id` FROM `users` WHERE `id`='".$userId."'");
if(!empty($user['id'])) {
$tc_points = (0.10*($payout*100));
$tc_points = ($tc_points < 1 ? 1 : number_format($tc_points, 0));
$db->Query("UPDATE `users` SET `ow_credits`=`ow_credits`+'".$reward."', `tasks_contest`=`tasks_contest`+'".$tc_points."' WHERE `id`='".$user['id']."'");
$db->Query("INSERT INTO `users_offers` (`uid`,`total_offers`,`total_revenue`,`last_offer`) VALUES ('".$user['id']."','1','".$reward."','".time()."') ON DUPLICATE KEY UPDATE `total_offers`=`total_offers`+'1', `total_revenue`=`total_revenue`+'".$reward."', `last_offer`='".time()."'");
$db->Query("INSERT INTO `completed_offers` (`user_id`,`survey_id`,`user_country`,`user_ip`,`revenue`,`reward`,`method`,`timestamp`) VALUES ('".$user['id']."','".$survey."','".$country."','".ip2long($userIP)."','".$payout."','".$reward."','Offerlite','".time()."')");
}
}
echo 'ok';
?>
HOLA...Your, postback created Suceesfully! Now is time for iframe integration
Just Open template/default/pages/offers.php, and add the following code after some of the existing offerwalls. break; code.
case 'offerlite' :
$title = 'Offerlitel';
$offer_wall = '<iframe src="https://offerlite.xyz//offerwall?userid=' . $data['id'] . '&key=' . $api_key.'" style="width:100%;height:690px;border:0;border-radius:5px;"></iframe>';
break;
.Replace YOUR API KEY by your Offerlite API key from Offerlite App Keys.
Scroll down and insert link to Offerlite offerwall:
/
<a href="<?php echo GenerateURL('offers&x=offerlite'); ?>" class="btn btn-secondary mb-1<?php echo ($method == 'offerlite' ? ' active' : ''); ?>">Offerlite</a>
And save, that is all!
What POSTBACK URL YOU NEED TO UPDATE IN Offerlite POSTBACK URL?
Note: Currency should be set in credits
Postback URL should be : http://yourdomain.com/system/gateways/offerlite.php?subId={{userId}}&transId={{transactionId}}&reward={{rewardValue}}&payout={{payout}}&status={{status}}&userIp={{userIp}}&type={{type}}&signature={{secret}}
AutoFaucetScript - Ultimate Auto Faucet By NGB Solutions Integration
AutoFaucetScript is a Very populer of New Mordern AutoFaucet Script which brings plenty of different features together into a complete system.
offerlite integration is very easy in this script - Just need to create 1 file, Modify 2 line of code, and thats it! Less than 5 minutes and you can bring offerlite offerwall to your users.
To create Postback file - open system/gateways/ and create file offerlite.php, put following code in this file:
<?php
define('BASEPATH', true);
require('../init.php');
$secret = "YOUR SECRET KEY"; //Enter Your Offerlite SECRET KEY
$userId = isset($_GET['subId']) ? $db->EscapeString($_GET['subId']) : null;
$survey = isset($_GET['transId']) ? $db->EscapeString($_GET['transId']) : null;
$reward = isset($_GET['reward']) ? $db->EscapeString($_GET['reward']) : null;
$payout = isset($_GET['payout']) ? $db->EscapeString($_GET['payout']) : null;
$userIP = isset($_GET['userIp']) ? $db->EscapeString($_GET['userIp']) : '0.0.0.0';
$country = isset($_GET['country']) ? $db->EscapeString($_GET['country']) : null;
if (md5($userId.$survey.$reward.$secret) != $_GET['signature']){
echo "ERROR: Signature doesn't match";
return;
}
if(!empty($userId) && $db->QueryGetNumRows("SELECT * FROM `completed_offers` WHERE `survey_id`='".$survey."' LIMIT 1") == 0)
{
$user = $db->QueryFetchArray("SELECT `id` FROM `users` WHERE `id`='".$userId."'");
if(!empty($user['id'])) {
$currentPrice = $db->QueryFetchArray("SELECT `value` FROM `bitcoin_price` ORDER BY `time` DESC LIMIT 1");
$usdPayout = $currentPrice['value']*$payout;
$tc_points = (0.10*$usdPayout);
$tc_points = ($tc_points < 1 ? 1 : number_format($tc_points, 0));
$db->Query("UPDATE `users` SET `ow_credits`=`ow_credits`+'".$reward."', `tasks_contest`=`tasks_contest`+'".$tc_points."' WHERE `id`='".$user['id']."'");
$db->Query("INSERT INTO `users_offers` (`uid`,`total_offers`,`total_revenue`,`last_offer`) VALUES ('".$user['id']."','1','".$reward."','".time()."') ON DUPLICATE KEY UPDATE `total_offers`=`total_offers`+'1', `total_revenue`=`total_revenue`+'".$reward."', `last_offer`='".time()."'");
$db->Query("INSERT INTO `completed_offers` (`user_id`,`survey_id`,`user_country`,`user_ip`,`revenue`,`reward`,`method`,`timestamp`) VALUES ('".$user['id']."','".$survey."','".$country."','".ip2long($userIP)."','".$usdPayout."','".$reward."','Offerlite','".time()."')");
}
}
echo 'ok';
?>
HOLA...Your, postback created Suceesfully! Now is time for iframe integration
Just Open template/default/pages/offers.php, and add the following code after some of the existing offerwalls. break; code.
case 'offerlite' :
$title = 'Offerlite';
$offer_wall = '<iframe src="https://offerlite.xyz//offerwall?userid=' . $data['id'] . '&key=' . $api_key.'" style="width:100%;height:690px;border:0;border-radius:5px;"></iframe>';
break;
💡.Replace YOUR API KEY by your Offerlite API key from Offerlite App Keys.
Scroll down and insert link to Offerlite offerwall:
<a href="<?php echo GenerateURL('offers&x=offerlite'); ?>" class="btn btn-secondary mb-1<?php echo ($method == 'offerlite' ? ' active' : ''); ?>">Offerlite</a>
And save, that is all!
What POSTBACK URL YOU NEED TO UPDATE IN Offerlite POSTBACK URL?
Note: Currency should be set in credits
Postback URL should be : http://yourdomain.com/system/gateways/offerlite.php?subId={{userId}}&transId={{transactionId}}&reward={{rewardValue}}&payout={{payout}}&status={{status}}&userIp={{userIp}}&type={{type}}&signature={{secret}}
Offerlite PTC API Integration
Integrate Offerzono PTC into any simple PHP project using this small function.
⚠️ To get API access, contact the admin via Telegram: @offerzono_support
1. Simple PHP Function
<?php
function offerzono_api($type = null, $country = null) {
// Supported types: ptc, shortlink, article
$userId = 1; // Your user ID
// Detect device
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
if (strpos($ua, 'mobile') !== false) {
$device = 'mobile';
} elseif (strpos($ua, 'tablet') !== false) {
$device = 'tablet';
} else {
$device = 'desktop';
}
if (empty($type)) {
return ['status' => 'error', 'msg' => 'Missing parameters'];
}
$url = 'https://offerzono.com/api';
$apiKey = 'YOUR_PUBLIC_KEY';
$secretKey = 'YOUR_PRIVATE_KEY';
$params = [
'type' => $type,
'apiKey' => $apiKey,
'userId' => $userId,
'device' => $device,
'country' => strtolower($country)
];
$ch = curl_init($url . '?' . http_build_query($params));
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CONNECTTIMEOUT => 15,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTPHEADER => [
'Secret: ' . $secretKey,
'Accept: application/json']
]);
$res = curl_exec($ch);
curl_close($ch);
return json_decode($res, true);
}
?>
2. Usage Example
<?php
$response = offerzono_api('ptc', 'us');
print_r($response);
?>
Offerlite ShortLinks API Integration
ShortLinks API is the same structure. Just change the API type.
⚠️ To get API access, contact the admin via Telegram: @offerzono_support
1. Usage Example
<?php
$response = offerzono_api('shortlink', 'us');
print_r($response);
?>
💡 Replace YOUR_PUBLIC_KEY and YOUR_PRIVATE_KEY from Offerzono App Settings.
Offerlite Read Article API Integration
Read Article API returns a list of daily article cards based on your configured article_daily_limit. Each card has one daily limit. When the user has already completed a card today, that card will return limit: 0/1, disabled: 1, and an empty URL.
⚠️ To get API access, contact the admin via Telegram: @offerzono_support
1. Usage Example
<?php
$response = offerzono_api('article', 'us');
print_r($response);
?>
2. API Request
GET https://offerlite.xyz/api?type=article&apiKey=YOUR_PUBLIC_KEY&userId=USER_ID&device=desktop&country=us
Secret: YOUR_PRIVATE_KEY
Accept: application/json
3. Successful Response Example
{
"status": "success",
"msg": "Request completed successfully",
"total_reward": "8",
"daily_limit": 10,
"completed_today": 2,
"available": 8,
"total_articles": 10,
"data": [
{
"id": 1,
"name": "Read Article #1",
"reward": "1",
"timer": 30,
"limit": "0/1",
"remaining_views": 0,
"completed": 1,
"disabled": 1,
"url": "",
"currency_name": "Coins"
},
{
"id": 3,
"name": "Read Article #3",
"reward": "1",
"timer": 30,
"limit": "1/1",
"remaining_views": 1,
"completed": 0,
"disabled": 0,
"url": "https://offerzono.com/offerwall/article_continue?...",
"currency_name": "Coins"
}
]
}
4. Response Fields
| Field | Description |
|---|---|
daily_limit | Maximum article cards available per user per day. |
completed_today | How many article rewards this user already completed today. |
available | How many article cards are still available today. |
data[].limit | 1/1 means available, 0/1 means already used. |
data[].disabled | 1 means the card must be disabled in your frontend. |
data[].url | Open this URL when the user clicks the card. It will start the article captcha/timer flow. |
💡 The API automatically calculates completed article views from article_history for the same app key and user ID for today. For example, if article_daily_limit is 10 and the user already completed 2, the API returns 10 cards: 2 disabled cards with 0/1 and 8 active cards with 1/1.