Integration iFrame + Postback

Integration Guide

Everything you need to embed the offerwall and credit users automatically.

You will need your PUBLIC KEY and SECRET KEY from your Setup page.

Flow

Simple & safe
1

Apply

Create your publisher account and submit the application.

2

Setup

Create your app, get keys, and configure the postback URL.

3

Go live

Embed the tracking link (iFrame) and credit via postback.

Checklist

Production
  • Verify signature before crediting.
  • Use transId to prevent double credits.
  • Check status to add or subtract reward.
  • Return OK or DUP quickly.

Integration Last updated: 2024-04-25

Publisher Apply

Go to: https://adswedmedia.com/publishers/apply and fill in the form.

An application is required to use any of our tools. Once you have created an app and been approved, you will receive a PUBLIC KEY and a SECRET KEY that you will need to integrate our offerwall.

  1. Go to in to your AdswedMedia account. Click on Monetize

  2. In Motenze page you can click on Setup

  3. You can get your wall tracking link and site keys for offerwall and postback setup on the setup page.

Postback

Whenever a user completes 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.

Params

HTTP GET
Our server will make a HTTP GET request to your server including all the following parameters.
subIdThis is the unique identifier code of the user who completed action on your platform.
transIdUnique identification code of the transaction made by your user on AdswedMedia.
rewardThe exact amount of your virtual currency to be credited to your user.
round_rewardThe amount of your virtual currency to be credited to your user in selected decimal points.
payoutThe offer payout in $
signatureMD5 hash that can be used to verify that the call has been made from our servers.
status Determines whether to add or subtract the amount of the reward. "1" is when the virtual currency should be added to the user and "2" when it should be subtracted. This may be because the advertiser has canceled the user's transaction (fraud or mistake).
userIpThe user's IP address who completed the action.
offer_idId of the offer completed
offer_nameOfferName completed by user
countryCountry (ISO2 form) from the lead comes
uuidUnique identification code of the click made by your user on AdswedMedia
event_idID of the offer event that was credited. For non-event conversions, it will be empty.
event_nameName of the offer event that was credited. For non-event conversions, it will be empty.

PHP Code

Signature
"reward" or "payout" parameters are always absolute values.

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. You can find your secret key in My Websites section.

Signature verification example
<?php
$secret    = ''; // Get your secret key from Adswedmedia
$subId     = isset($_REQUEST['subId']) ? $_REQUEST['subId'] : null;
$transId   = isset($_REQUEST['transId']) ? $_REQUEST['transId'] : null;
$reward    = isset($_REQUEST['reward']) ? $_REQUEST['reward'] : null;
$signature = isset($_REQUEST['signature']) ? $_REQUEST['signature'] : null;

// Validate Signature
if (md5($subId . $transId . $reward . $secret) != $signature) {
  echo "ERROR: Signature doesn't match";
  return;
}
?>

Postback Response

Our server will expect the following answers:

  • "OK" when you receive a new transaction.
  • "DUP" when you receive a duplicate transaction. In this case, our server will stop further attempts for that transaction

Our servers wait for a response for a maximum time of 60 seconds before the 'timeout'. In this case, it will be retried sending the same transaction up to 5 occasions during the following hours. 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 because of the timeout.

Testing Tool

You can find a testing tool on the Setup page, where tracking links are available. This tool enables you to send postbacks to test your integration.