Add your Website

To be able to integrate our adwall, 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 adwall.

To register your website into our service, please follow these steps:

  1. 1. Login to your OurAdWall account.
  2. 2. You should now see the Add Website button at sidebar. Click this button to add your first website.
  3. 3. Set your Website Name, Domain Name and application type (platform) and proceed to next step.
  4. 4. 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).
  5. 5. 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.
  6. 6. 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.

Integration OurAdWall

Before being able to integrate our Adwall, you must register your website first. Once you have registered your website you will have an API KEY and a SECRET KEY, that you will need in the following steps.

  1. 1. Click on Manage sites button on navbar.
  2. 2. From your websites list, you can get your API and Secret keys, anyway if you click Edit button on any of your websites you will be able to get your full integration code of the adwall.
Offerwall Code

<iframe style="width:100%;height:800px;border:0;padding:0;margin:0;" scrolling="yes" frameborder="0" loading="lazy" src="http://bonanzawall.com/ourwall/start/[API_KEY]/[USER_ID]"></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.

ParameterDescriptionValue
[API_KEY]Unique API Code provided when you registered your websitevarchar(32)
[USER_ID]Unique identifier code of the user of your siteint(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.

ParameterDescriptionExample
sub_idThis is the unique identifier code of the user who completed action on your platform.123
trans_idUnique identification code of the transaction made by your user.12345678
amountThe amount of your virtual currency to be credited to your user.1.25
currencyThe name of your currency set when you registered your website.Points
ip_addressThe user’s IP address who completed the action.192.168.1.0
typeThe type of completed offer.Surfing Ads
signatureMD5 hash that can be used to verify that the call has been made from our servers.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 sub_id trans_id amount secret key. You can find your Secret Key of your website in Manage sites section.

The formula to be checked is as follows:

If you have restricted the traffic to your website by some firewall proxy service like CloudFlare, you should whitelist our IP to your postback path 109.234.160.161


<?php
  $secret = ""; // Get your secret key from OurAdWall

  $userId = isset($_REQUEST['sub_id']) ? $_REQUEST['sub_id'] : null;
  $transactionId = isset($_REQUEST['trans_id']) ? $_REQUEST['trans_id'] : null;
  $amount_points = isset($_REQUEST['amount']) ? $_REQUEST['amount'] : null;
  $userIp = isset($_REQUEST['ip_address']) ? $_REQUEST['ip_address'] : "0.0.0.0";
  $currency = isset($_REQUEST['currency']) ? $_REQUEST['currency'] : null;
  $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
  $signature = isset($_REQUEST['signature']) ? $_REQUEST['signature'] : null;

  // Validate Signature
  if (md5($userId . $transactionId . $amount_points . $secret) != $signature) {
   echo "ERROR: Signature doesn't match";
   return;
  }
?>
Responding to Postback

Our servers will expect your website to respond with “1”. If your postback doesn’t return “1” as response, postback will be marked as failed (even if postback was successfully called) and you would 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 OurAdWall

  $userId = isset($_REQUEST['sub_id']) ? $_REQUEST['sub_id'] : null;
  $transactionId = isset($_REQUEST['trans_id']) ? $_REQUEST['trans_id'] : null;
  $amount_points = isset($_REQUEST['amount']) ? $_REQUEST['amount'] : null;
  $userIp = isset($_REQUEST['ip_address']) ? $_REQUEST['ip_address'] : "0.0.0.0";
  $currency = isset($_REQUEST['currency']) ? $_REQUEST['currency'] : null;
  $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
  $signature = isset($_REQUEST['signature']) ? $_REQUEST['signature'] : null;

  // Validate Signature
  if (md5($userId . $transactionId . $amount_points . $secret) != $signature) {
   echo "ERROR: Signature doesn't match";
   return;
  }

  // Check if the transaction is new, use $transId to valiate it
  if(isNewTransaction($transactionId))
  {
    // Transaction is new, reward your user
    processTransaction($userId, $amount_points, $transactionId);
  }

  echo "1"; // Important!
?>