Documentation Integration API Reference Android SDK Web SDK Publishers Advertisers Log in Get Started
Integration guide

Choose a path and ship the first surface.

Connect iFrame, S2S Postback, Offers API, Report API, Web SDK, Android SDK, Native Banner API or a platform plugin. Every integration uses the same site key, user id and postback contract so you can swap or combine paths at any time.

iFrameWeb SDKAndroid SDKOffers APIReport APIS2S HMACNative Banner APIPlugins
#sec-iframe

iFrame Integration

The fastest way to embed our offerwall. Three steps: apply, get your keys, paste the iFrame.

Step 1 — Apply.

Create a publisher account and submit your app or website for review.

Step 2 — Get keys.

After approval, copy your Public Key (site key) and Secret Key from Setup in your dashboard.

Step 3 — Embed.

Paste the tracking link in an iFrame and configure your postback URL. Replace YOUR_KEY with your Public Key and USER_ID with your user's unique identifier.

iframe.html
<iframe
  src="https://www.demo.pro.adswedmedia.com/offer/YOUR_KEY/USER_ID"
  width="100%"
  height="700"
  frameborder="0"
  allow="clipboard-write"
></iframe>
#sec-postback

Postback (Server-to-Server)

When a user completes an offer, we send a HTTP GET request to your postback URL with the parameters below. Use this to credit (and, if needed, debit) your user's balance from the server side.

Parameters

ParameterTypeDescription
subIdstringYour user's unique identifier (the one you passed as USER_ID).
transIdstringUnique transaction ID — use for deduplication.
rewardnumberAmount of virtual currency to credit.
payoutnumberOffer payout in USD.
signaturestringMD5 hash for verification (see below).
statusinteger1 = credit  ·  2 = chargeback (subtract).
offer_idstringCompleted offer ID.
offer_namestringCompleted offer name.
round_rewardnumberReward rounded to your site's decimal setting.
userIpstringUser's IP address.
countrystringISO 2-letter country code.
uuidstringUnique click ID.
event_idstringEvent ID (multi-reward offers only).
event_namestringEvent name (multi-reward offers only).

Signature verification

Always verify the signature before applying the reward or chargeback. The formula is md5(subId + transId + reward + SECRET_KEY).

postback.php
// Verify a postback before crediting
$expected = md5($_GET['subId'] . $_GET['transId'] . $_GET['reward'] . SECRET_KEY);

if (!hash_equals($expected, $_GET['signature'])) {
    http_response_code(403);
    exit('Invalid signature');
}

// Deduplicate by transId
if (transactionExists($_GET['transId'])) {
    exit('OK'); // already handled
}

if ($_GET['status'] == 1) {
    creditUser($_GET['subId'], $_GET['reward']);
} elseif ($_GET['status'] == 2) {
    debitUser($_GET['subId'], $_GET['reward']); // chargeback
}

echo 'OK';
Always respond with HTTP 200 and a short body (e.g. OK) once you've handled the event. Non-200 responses trigger retries from our Action Center.
#sec-api

Offers API

Use the Offers API when you want a custom UI and need offer data in JSON. Keep the click id from the response so your postback audit trail can connect back to the user action.

GET/api/v1/offers
Rate limit: requests/hour per site credentials. Responses include an X-RateLimit-Remaining header.

Parameters

ParameterRequiredTypeDescription
site_keyrequiredstringSite public key.
site_secretrequiredstringSite secret key.
typeoptionalstringoffer or multireward.
limitoptionalintegerResults per page (1–500). Default: 100.
offsetoptionalintegerSkip N results for pagination.
countryoptionalstringISO 2-letter code (US, DE, BR).
deviceoptionalstringandroid, ios, desktop.
min_payoutoptionalfloatMinimum USD payout.
updated_sinceoptionalstringISO 8601 date for incremental sync.

Example request

offers-api.sh
# Fetch US Android offers with a minimum $1 payout
GET https://www.demo.pro.adswedmedia.com/api/v1/offers?site_key=YOUR_KEY&site_secret=YOUR_SECRET
  &country=US
  &device=android
  &min_payout=1.00
  &limit=50

Example response

response.json
{
  "success": true,
  "count": 42,
  "offers": [
    {
      "offer_id": "1234",
      "name": "Complete tutorial",
      "preview": "https://.../img.jpg",
      "payout": 2.40,
      "reward": 240,
      "country": ["US"],
      "device": "android",
      "click_url": "https://.../click?uuid=..."
    }
  ]
}

Error codes

StatusMeaning
401Invalid site_key or site_secret.
403Site not approved for API access.
422Invalid parameter (see error field).
429Rate limit hit — respect X-RateLimit-Reset.
#sec-report

Report API

Fetch traffic and conversion reports for your site. Get daily, per-offer or per-country breakdowns.

GET/api/v1/reports

Query parameters

ParameterRequiredDescription
site_keyrequiredYour site key.
site_secretrequiredYour site secret.
fromoptionalStart date YYYY-MM-DD. Default: 30 days ago.
tooptionalEnd date YYYY-MM-DD. Default: today.
group_byoptionalday, offer or country. Default: day.
offer_idoptionalFilter by a specific offer ID.

Response format

report.json
{
  "success": true,
  "site": { "id": 10, "key": "YOUR_KEY" },
  "period": { "from": "2026-03-01", "to": "2026-04-03" },
  "summary": {
    "clicks": 150,
    "conversions": 12,
    "revenue": 45.50,
    "chargebacks": 1,
    "pending": 20.00,
    "paid": 25.50,
    "cvr": 8.0,
    "epc": 0.3033
  },
  "group_by": "day",
  "breakdown": [
    {
      "date": "2026-04-01",
      "clicks": 50,
      "conversions": 4,
      "revenue": 15.25,
      "chargebacks": 0,
      "cvr": 8.0,
      "epc": 0.305
    }
  ]
}

Summary fields

FieldTypeDescription
clicksintegerTotal clicks in the period.
conversionsintegerTotal conversions.
revenuenumberTotal revenue (USD).
chargebacksintegerTotal chargebacks.
pendingnumberRevenue awaiting approval.
paidnumberRevenue already paid out.
cvrnumberConversion rate (conversions ÷ clicks × 100).
epcnumberEarnings per click.

Node.js example

report.js
const axios = require("axios");

async function getReport() {
  const { data } = await axios.get("https://www.demo.pro.adswedmedia.com/api/v1/reports", {
    params: {
      site_key: "YOUR_SITE_KEY",
      site_secret: "YOUR_SITE_SECRET",
      from: "2026-04-01",
      to: "2026-04-03",
      group_by: "day"   // or "offer" or "country"
    }
  });

  if (data.success) {
    console.log("Summary", data.summary);
    console.log(`Revenue: $${data.summary.revenue}`);
    data.breakdown.forEach(row =>
      console.log(`${row.date}: ${row.clicks} clicks, $${row.revenue}`)
    );
  }
}

getReport();

PHP example

report.php
$response = file_get_contents(
    "https://www.demo.pro.adswedmedia.com/api/v1/reports?" . http_build_query([
        "site_key"    => "YOUR_KEY",
        "site_secret" => "YOUR_SECRET",
        "from"        => "2026-04-01",
        "to"          => "2026-04-03",
        "group_by"    => "offer",
    ])
);
$data = json_decode($response, true);

echo "Revenue: $" . $data["summary"]["revenue"];
foreach ($data["breakdown"] as $row) {
    echo $row["offer_name"] . ": " . $row["clicks"] . " clicks\n";
}
#sec-websdk

Web SDK

One script tag and five lines of code. Works in any modern browser and any framework.

Quick start

index.html
<!-- 1. Load the SDK -->
<script src="https://www.demo.pro.adswedmedia.com/sdk/v1/adsw.js"></script>

<!-- 2. Add a button -->
<button id="earn-btn">Earn Rewards</button>

<script>
  // 3. Initialize
  ADSW.init({
    appKey: 'YOUR_APP_KEY',
    userId: 'USER_123',
    appName: 'My App',
    enablePolling: true
  });

  // 4. Open the offerwall on click
  document.getElementById('earn-btn').onclick = function() {
    ADSW.show();
  };

  // 5. Listen for rewards
  ADSW.on('reward', function(data) {
    console.log('Earned', data.reward, data.currency);
  });
</script>
For embed mode (inline instead of modal): ADSW.show({ mode: 'embed', container: '#my-div', height: '700px' })

Configuration options

OptionTypeDefaultDescription
appKeystringYour site public key (required).
userIdstringUnique user id in your app (required).
appNamestringShown as the reward surface title.
enablePollingbooleantruePoll for rewards while modal is open.
pollIntervalinteger15Seconds between reward polls.
themestringautolight, dark or auto.

Events & methods

APIDescription
ADSW.init(opts)Initialize the SDK with your keys and user context.
ADSW.show()Open the offerwall modal. Accepts { mode: 'embed', container }.
ADSW.close()Programmatically close the offerwall.
ADSW.on('reward', cb)Fired when a reward is credited. cb(data).
ADSW.on('close', cb)Fired when the user closes the modal.
ADSW.getBalance()Return the user's current cached balance.

Full reference: Web SDK documentation.

#sec-android

Android SDK

Native Android SDK with Playtime support. Gradle dependency, one-line init, session-based rewards.

Init session

POST/api/sdk/v1/init

Creates a 24-hour session. Returns a session id and the offerwall URL.

ParamRequiredDescription
app_keyrequiredYour site public key.
user_idrequiredUnique user identifier.
sdk_versionoptionalSDK version for analytics.
domainoptionalApp package name or domain.
init-response.json
{
  "success": true,
  "session_id": "a1b2c3d4e5f6...64-char-hex",
  "site": {
    "name": "My Reward App",
    "currency": "coins",
    "decimals": 2
  },
  "config": {
    "offerwall_url": "https://www.demo.pro.adswedmedia.com/offer/KEY/user123",
    "poll_interval": 15
  }
}

Poll rewards

GET/api/sdk/v1/rewards

Returns new rewards since the last poll. Send app_key, user_id and the session id returned by init.

rewards-response.json
{
  "success": true,
  "rewards": [
    {
      "trans_id": "abc123",
      "reward": 240,
      "offer_name": "Complete tutorial",
      "timestamp": "2026-04-24T10:15:00Z"
    }
  ],
  "next_poll": 15
}
For the full method-level reference (Kotlin signatures, callbacks, error handling): Android SDK documentation.
#native-banner-api

Native Banner API

Display banner ads in mobile apps (Flutter, Kotlin, Swift, React Native) or any platform that can make HTTP requests. Returns JSON with image URLs — no JavaScript required.

GET/api/banners/v1/native

Parameters

ParamRequiredDescription
site_keyYesYour site/app key from the publisher dashboard.
sub_idYesUnique user ID in your app (for tracking & anti-fraud).
sizeNoBanner size. Default 320x50. Options: 320x50, 300x250, 728x90.
limitNoMax banners to return (1–5). Default 1.

Response

native-banner.json
{
  "success": true,
  "banners": [
    {
      "id": 42,
      "image_url": "https://pro.adswedmedia.com/asset/storage/banners/example.jpg",
      "click_url": "https://pro.adswedmedia.com/api/banners/v1/click?campaign_id=42&site_key=YOUR_KEY&sub_id=123",
      "impression_url": "https://pro.adswedmedia.com/api/banners/v1/impression?campaign_id=42&site_key=YOUR_KEY&sub_id=123",
      "width": 320,
      "height": 50
    }
  ]
}

Integration steps

  1. Call the endpoint to get banner data.
  2. Display the image_url in your app.
  3. When the banner becomes visible, fire a GET request to impression_url (CPM tracking).
  4. When the user taps the banner, open click_url in the system browser.

Flutter example

banner_ad.dart
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:url_launcher/url_launcher.dart';

class BannerAd {
  final int id, width, height;
  final String imageUrl, clickUrl, impressionUrl;

  BannerAd.fromJson(Map<String, dynamic> json)
    : id = json['id'],
      imageUrl = json['image_url'],
      clickUrl = json['click_url'],
      impressionUrl = json['impression_url'],
      width = json['width'],
      height = json['height'];
}

Future<BannerAd?> fetchBanner(String siteKey, String userId) async {
  final uri = Uri.parse(
    'https://pro.adswedmedia.com/api/banners/v1/native'
    '?site_key=$siteKey&sub_id=$userId&size=320x50&limit=1',
  );
  final res = await http.get(uri);
  if (res.statusCode != 200) return null;
  final data = jsonDecode(res.body);
  if (data['success'] != true || (data['banners'] as List).isEmpty) return null;
  return BannerAd.fromJson(data['banners'][0]);
}

Kotlin (Android) example

BannerApi.kt
import okhttp3.OkHttpClient
import okhttp3.Request
import org.json.JSONObject

suspend fun fetchBanner(siteKey: String, userId: String): JSONObject? {
  val url = "https://pro.adswedmedia.com/api/banners/v1/native" +
            "?site_key=$siteKey&sub_id=$userId&size=320x50&limit=1"
  val req = Request.Builder().url(url).get().build()
  val res = OkHttpClient().newCall(req).execute()
  if (!res.isSuccessful) return null
  val json = JSONObject(res.body!!.string())
  val banners = json.getJSONArray("banners")
  return if (banners.length() > 0) banners.getJSONObject(0) else null
}

Swift (iOS) example

BannerService.swift
import Foundation

struct BannerAd: Decodable {
  let id: Int
  let imageUrl, clickUrl, impressionUrl: String
  let width, height: Int

  enum CodingKeys: String, CodingKey {
    case id, width, height
    case imageUrl = "image_url"
    case clickUrl = "click_url"
    case impressionUrl = "impression_url"
  }
}

func fetchBanner(siteKey: String, userId: String) async throws -> BannerAd? {
  let urlStr = "https://pro.adswedmedia.com/api/banners/v1/native" +
    "?site_key=\(siteKey)&sub_id=\(userId)&size=320x50&limit=1"
  guard let url = URL(string: urlStr) else { return nil }
  let (data, _) = try await URLSession.shared.data(from: url)
  struct Wrap: Decodable { let success: Bool; let banners: [BannerAd] }
  let w = try JSONDecoder().decode(Wrap.self, from: data)
  return w.banners.first
}
#sec-plugins

Platform Plugins

Install once, monetize instantly. Our plugins load the Web SDK remotely so they always stay up to date — no local SDK copies to update.

All plugins load the SDK from adswedmedia.com/sdk/v1/adsw.js. Every user of your plugin gets the latest fixes automatically.

WordPress

Install the adswedmedia-offerwall plugin, enter your API key in Settings → AdswedMedia, and use shortcodes to display the offerwall on any page or post.

  1. Upload adswedmedia-offerwall to /wp-content/plugins/.
  2. Activate via the Plugins menu.
  3. Go to Settings → AdswedMedia and enter your API Key.
  4. Add the shortcode to any page or post.
ShortcodeDescription
[adswedmedia_offerwall]Button that opens the offerwall modal.
[adswedmedia_offerwall mode="embed"]Embed the offerwall directly on the page.
[adswedmedia_offerwall button_text="Earn"]Custom button text.
[adswedmedia_banner size="300x250"]Banner ad — sizes: 300x250, 728x90, 320x50, 160x600, 468x60.

WooCommerce

Install adswedmedia-woo-rewards. Users earn shop credit from the offerwall that applies automatically at checkout.

  1. Install and activate on top of WordPress + WooCommerce.
  2. Go to WooCommerce → AdswedMedia and enter your API Key.
  3. Set the conversion rate (e.g. 100 coins = $1 store credit).
  4. Add the widget or shortcode to your shop pages.

Shopify

Install the AdswedMedia app from the Shopify marketplace (or manually via the Shopify Admin API). The app injects the Web SDK into your theme and exposes a rewards section in the storefront.

  1. Install the AdswedMedia app from the Shopify App Store.
  2. Connect your account — we auto-generate the site key.
  3. Enable the Earn rewards block in your theme editor.
  4. Map reward currency to shop credit or discount codes.

Wix

Install the AdswedMedia Wix App. Users complete offers inside your Wix site and rewards sync back through Velo webhooks.

  1. Install the AdswedMedia app from the Wix App Market.
  2. Paste your API Key in the app settings.
  3. Drag the Offerwall element onto any page.
  4. (Optional) Use Velo to listen for reward events and update your user model.