InstantPay

Publisher Integration Guide

Add the InstantPay offerwall to your website or app. Your users complete advertiser offers (PTC, Social, PPA), they are rewarded in your own points, and you earn a share of every completed offer. Your users never need an InstantPay account.

How it works in one minute: you embed the offerwall for your logged-in user → the user completes an offer → InstantPay sends a server-to-server postback to your website → you credit your user's points. You are paid your publisher share separately (see Payouts).

Contents

  1. Quick start (6 steps)
  2. Add and verify your website
  3. Offerwall settings
  4. Embed the offerwall
  5. Signed user IDs (security)
  6. Offer types and how rewards are paid
  7. Postbacks (credit your users)
  8. API reference (custom UI)
  9. Revenue split and points
  10. Anti-fraud rules and limits
  11. Banners (CPM / CPC)
  12. Publisher payouts
  13. Known limits
  14. Testing checklist
  15. Troubleshooting

1. Quick start

  1. Create an account, open Publish, and set your publisher payment method in Profile.
  2. Add website (name + URL) and verify ownership (step 2).
  3. Wait for approval. You then receive an API key.
  4. In site settings set the postback URL (HTTPS), a postback secret (16–64 characters), points name, points per $1 and the user share.
  5. Build the postback receiver (step 7) and embed the offerwall for the logged-in user (step 4).
  6. Run the testing checklist (step 13), then go live.

2. Add and verify your website

To stop other people from registering a domain they do not own, every website must be verified before it can be approved. After you add a website, its card in Publish shows your personal verification code. Use one of these methods, then press Verify now:

Method A – file:  https://yourdomain.com/instantpay-verify.txt
                  (the file must contain your code)

Method B – meta tag inside <head> of your homepage:
<meta name="instantpay-verify" content="YOUR_CODE">

The check is made from our servers, so the file or page must be publicly reachable (not behind a login or firewall). Redirects such as http→https or non-www→www are followed. You can remove the file or tag after verification. If you change your domain, add it as a new website.

3. Offerwall settings (Publish → your site)

The offerwall shows no offers until a valid postback URL and secret are saved.

4. Embed the offerwall

<iframe
  src="https://offers.rewardedtask.com/offerwall.php?key=YOUR_API_KEY&uid=USER_ID&username=Name&uid_ts=TS&uid_sig=SIG"
  width="100%" height="700" style="border:0;border-radius:12px" loading="lazy"></iframe>
ParameterRequiredDescription
keyyesYour website API key.
uidyesYour logged-in user's ID, 1–64 characters. Never share one ID between users.
usernamenoDisplay name, shown in your postback logs.
uid_ts, uid_sigif signing is onServer-generated signature (step 5).

Only render the iframe for authenticated users. Offers open advertiser pages in a new browser tab, so pop-ups must be allowed for the offerwall (the page tells the user if the browser blocked it).

Events for your page

The offerwall notifies the page that contains it with postMessage, so you can refresh the user's balance:

window.addEventListener('message', function (e) {
  if (e.origin !== 'https://offers.rewardedtask.com') return;          // always check the origin
  var d = e.data || {};
  if (d.source !== 'instantpay') return;
  if (d.type === 'reward')    { /* PTC finished: d.points, d.points_name, d.event_id */ refreshBalance(); }
  if (d.type === 'submitted') { /* proof sent for review */ }
});

Do not credit users from this event – it comes from the browser. Credit only from the server postback.

5. Signed user IDs (security)

Without signing, anybody could open the offerwall URL with someone else's uid and earn into that account. With Require signed user IDs enabled, InstantPay accepts a uid only when it comes with a signature that only your server can create.

How it works: your server computes HMAC-SHA256(secret, uid + "|" + timestamp) using your postback secret, and puts the timestamp (uid_ts) and the lowercase hex result (uid_sig) in the iframe URL. We recompute it; if it matches and the timestamp is less than 24 hours old, the user is accepted. Every API call the offerwall makes carries the same three values.

Rules: sign the exact uid string you pass, use the Unix time in seconds, generate a fresh signature each time you render the page (a signed URL works for 24 hours, so do not publish it), and sign on the server only.

PHP

<?php
$uid = (string)$user['id'];
$ts  = time();
$sig = hash_hmac('sha256', $uid . '|' . $ts, $POSTBACK_SECRET);
$src = 'https://offers.rewardedtask.com/offerwall.php?' . http_build_query([
  'key' => $API_KEY, 'uid' => $uid, 'username' => $user['name'],
  'uid_ts' => $ts, 'uid_sig' => $sig,
]);

Node.js

const crypto = require('crypto');
const uid = String(user.id), ts = Math.floor(Date.now() / 1000);
const sig = crypto.createHmac('sha256', POSTBACK_SECRET).update(uid + '|' + ts).digest('hex');
const src = 'https://offers.rewardedtask.com/offerwall.php?key=' + API_KEY + '&uid=' + encodeURIComponent(uid) +
            '&uid_ts=' + ts + '&uid_sig=' + sig;

Python

import hmac, hashlib, time
uid = str(user.id); ts = int(time.time())
sig = hmac.new(POSTBACK_SECRET.encode(), f"{uid}|{ts}".encode(), hashlib.sha256).hexdigest()

Test it: open the iframe URL with a wrong uid_sig – you must see the “Integration required” message and no offers. With the correct signature offers appear.

6. Offer types and how rewards are paid

TypeWhat the user doesWhen the reward is posted
PTCOpens the advertiser page in a new tab, waits for the timer, solves the captcha (if enabled), presses Claim.Instantly after Claim. type=ptc
SocialFollows / subscribes / likes on YouTube, TikTok, X, Instagram or Facebook, then submits their username and a screenshot.When the advertiser approves the proof, or automatically after the review period. type=social
PPACompletes a custom action (sign-up, install, survey…) and submits the requested text and/or screenshot.Same as Social. type=ppa

Telegram join tasks are only available in the Telegram Mini App because they need a Telegram account.

Offers a user has completed disappear from the lists. When nothing is left, the tab shows that there are no offers right now. The hosted offerwall may also show a sponsored space above/below the offers and a short footer set by the platform.

Statuses a user sees: Started → In review → rewarded (appears in History), or Rejected. A rejected user can press Dispute in History once; a moderator then decides. Approved disputes are paid and posted back like any other reward.

Social and PPA rewards can arrive hours or days after the user finished, so your postback receiver must work at any time, not only while the user is online.

7. Postbacks (credit your users)

When a reward is final, InstantPay sends an HTTP GET request to your Postback URL with these query parameters:

ParameterDescription
user_idThe uid you passed to the offerwall.
usernameThe display name you passed (may be empty).
pointsPoints to credit, in your points system. A plain decimal string, up to 4 decimals (e.g. 32.5).
points_nameYour points name.
amount_usdThe user's reward in USD, 6 decimals.
typeptc, social or ppa.
titleOffer title. Also ptc_id or task_id.
event_id / transaction_idUnique ID of this reward (identical values). Use it to prevent double crediting.
sigHMAC-SHA256 (lowercase hex) of event_id|user_id|points, keyed with your postback secret. Verify this.
secretYour secret, sent for older integrations. Prefer sig; the secret in a URL can end up in server logs.
timeUnix time of this delivery attempt.

Example request:

GET /postback.php?user_id=1042&username=Sam&points=32.5&points_name=Coins&amount_usd=0.000325
    &type=ptc&title=Best+site&ptc_id=7&event_id=ptc_view_981&transaction_id=ptc_view_981
    &time=1764067800&secret=...&sig=9c1f…

Your receiver must

  1. Be reachable over HTTPS on port 443 with a valid certificate, and answer within 15 seconds.
  2. Verify sig with a constant-time comparison. Reject the request if it does not match.
  3. Be idempotent: store event_id in a table with a UNIQUE index, in the same database transaction as the credit. If it already exists, do not credit again – but still answer ok.
  4. Answer HTTP 200 with a body containing ok (or JSON {"ok":true}) only after the credit is committed. Any other answer, or a 200 with an error body, counts as failed.
<?php
// postback.php
$secret  = getenv('INSTANTPAY_SECRET');
$eventId = $_GET['event_id'] ?? '';
$userId  = $_GET['user_id']  ?? '';
$points  = $_GET['points']   ?? '';

$expected = hash_hmac('sha256', $eventId . '|' . $userId . '|' . $points, $secret);
if (!hash_equals($expected, strtolower($_GET['sig'] ?? ''))) { http_response_code(403); exit('bad signature'); }
if (!is_numeric($points) || $points <= 0 || $eventId === '') { http_response_code(400); exit('bad request'); }

$pdo->beginTransaction();
try {
  // table: instantpay_events(event_id VARCHAR(80) PRIMARY KEY, user_id, points DECIMAL(18,4), created_at)
  $ins = $pdo->prepare('INSERT IGNORE INTO instantpay_events(event_id,user_id,points,created_at) VALUES(?,?,?,NOW())');
  $ins->execute([$eventId, $userId, $points]);
  if ($ins->rowCount() === 1) {                       // first time we see this event
    $pdo->prepare('UPDATE users SET points = points + ? WHERE id = ?')->execute([$points, $userId]);
  }
  $pdo->commit();
  echo 'ok';
} catch (Throwable $e) { $pdo->rollBack(); http_response_code(500); echo 'error'; }
// Node.js (Express)
app.get('/postback', async (req, res) => {
  const { event_id = '', user_id = '', points = '', sig = '' } = req.query;
  const expected = crypto.createHmac('sha256', process.env.INSTANTPAY_SECRET)
                         .update(`${event_id}|${user_id}|${points}`).digest('hex');
  const a = Buffer.from(expected), b = Buffer.from(String(sig).toLowerCase());
  if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) return res.status(403).send('bad signature');
  const inserted = await db.insertIgnoreEvent(event_id, user_id, points);   // UNIQUE(event_id)
  if (inserted) await db.addPoints(user_id, points);
  res.send('ok');
});

Retries and history

If your endpoint fails, the reward stays queued and is retried automatically (up to 8 attempts with growing delays). Fix your endpoint and the pending rewards are delivered; the same event_id is always reused, which is why idempotency matters. Each user's History tab shows the delivery status (delivered / retrying / failed), and the postback log in Publish lists every attempt with your server's HTTP code.

8. API reference (custom UI)

Base: https://offers.rewardedtask.com/pub_api.php. Send a=action plus parameters as query string, form fields or JSON. Responses are JSON: {"ok":true,…} or {"ok":false,"error":"…"}. Every user-related call needs key, uid and (when signing is on) uid_ts, uid_sig. The offerwall page uses these same calls.

Custom UIs should also send dev – an optional 32-character hex device ID you generate once per browser and keep in a cookie/localStorage. It helps us recognise the same person on several websites. Without it we fall back to IP + browser. You may also send fp (a short string made from screen size, time zone and language) – it separates different people who share an IP address and the same phone model.

ActionMethodParametersReturns
offersGETkey, uid, uid_ts, uid_sigptc[], social[], ppa[] – each with id, title, points, points_name, reward_usd. PTC adds duration. Social/PPA add type, action, description, status (new, started, review, rejected) and spec (handle, text, shot, prompt = what proof is required).
ptc_startPOSTkey, uid, username, ptc_id (+signature)url (open it in a new tab), duration, session, points.
ptc_completePOSTkey, uid, session, captcha (+signature)points, event_id, postback_status. Only valid after duration seconds.
task_startPOSTkey, uid, username, task_id (+signature)url, title, description, spec, min_wait (seconds before submit is accepted), points.
task_submitPOST multipartkey, uid, task_id, handle (social), text (if required), shot (image file, max 3 MB), captcha (+signature)status: "pending". The reward is posted after approval.
task_disputePOSTkey, uid, task_id (+signature)Sends a rejected submission to a moderator (once).
historyGETkey, uid (+signature)history[] (PTC), tasks[] (Social/PPA with status: pending, done, rejected, disputed) including postback delivery status, and elsewhere[] (offers this person completed on other websites).
bannerGETkey, sizeA banner for that size (see Banners).
banner_clickGETkey, idCounts the click and redirects (302).
curl "https://offers.rewardedtask.com/pub_api.php?a=offers&key=YOUR_KEY&uid=1042&uid_ts=1764067800&uid_sig=SIG"

curl -X POST "https://offers.rewardedtask.com/pub_api.php" \
  -F a=task_submit -F key=YOUR_KEY -F uid=1042 -F uid_ts=1764067800 -F uid_sig=SIG \
  -F task_id=15 -F handle=samtube -F shot=@proof.png -F captcha=TOKEN

If you build your own UI you must open the advertiser URL in a new tab inside the user's click (browsers block pop-ups opened after an asynchronous request), show the timer, and render the captcha widget with the provider's explicit-render API when captcha is enabled. The hosted offerwall already does all of this.

9. Revenue split and points

  1. The advertiser pays the full cost of an action.
  2. The platform keeps its commission (PTC: PTC commission; Social/PPA: advertiser fee). The rest is the pool.
  3. The pool is split by your user share %: the user's part is converted to points and posted back; the remainder is your publisher earning.

Example: cost $0.010, platform 35% → pool $0.0065. User share 50% → user $0.00325 = 325 points at 100000 points per $1; you earn $0.00325. Your earnings are listed in Publish and are paid out under the rules below.

10. Anti-fraud rules and limits

Your responsibilities: never give one uid to several people, never auto-click or incentivise fake accounts, always sign IDs, and keep your secret private. Traffic judged invalid is refunded to advertisers and may be deducted from your earnings; repeated abuse leads to suspension.

11. Banners (CPM / CPC)

The easiest way: open Publish → Banner code generator, pick your website, tick the banner sizes you want and press Generate code. Paste the code where the banner should appear – one block per size. The banner is responsive (never wider than its container).

Manual use of the API:

GET https://offers.rewardedtask.com/pub_api.php?a=banner&key=YOUR_API_KEY&size=300x250
→ {"ok":true,"banner":{"id":12,"title":"…","image_url":"…","link":"…","size":"300x250"}}

GET https://offers.rewardedtask.com/pub_api.php?a=banner_click&key=YOUR_API_KEY&id=12
→ 302 redirect to the advertiser (this is how clicks are counted – always link the banner through it)

Available sizes are set by the platform (for example 300x250, 728x90, 160x600, 320x50, 468x60).

12. Publisher payouts

Your publisher earnings (the part of the pool you keep, plus banner and broadcast earnings) accumulate in Publish. New earnings are held for the platform's hold period, then become Available. Request a payout when your available balance reaches the minimum; payouts follow the platform schedule (instant / net 15 / net 30) and the payment method set in your Profile, and are reviewed by an admin. Users' points are not paid by us – they live on your website.

13. Testing checklist

  1. Website verified and approved, API key visible, postback URL + secret saved.
  2. Open the iframe for a test user: offers appear. Change one character of uid_sig: offers must disappear.
  3. Complete one small PTC. Within seconds your receiver must log a request with a valid sig and credit points once.
  4. Replay the same request manually: points must not increase a second time and your receiver must still answer ok.
  5. Temporarily make the receiver return 500, complete another PTC, then fix it: the reward must arrive after the automatic retry (see the postback log in Publish).
  6. Submit a Social/PPA proof: History shows “Waiting for advertiser review”. After approval, the postback arrives with type=social or ppa.

14. Troubleshooting

MessageMeaning / fix
Integration requiredkey or uid missing, or signing is on and uid_ts/uid_sig are missing/wrong/older than 24 h. Re-check the signing code and that you use the same secret as in Publish.
Configure your HTTPS postback URL…Save a valid HTTPS URL and a secret of 16+ characters in site settings.
Invalid or inactive publisher keyWrong key, or the website is not approved / was paused.
Captcha failedThe user did not solve the captcha or it expired; they should retry.
You have not watched the full timeThe timer must finish; the tab must stay open.
Your browser blocked the advertiser tabAllow pop-ups for the offerwall, then press Start again.
Too many accounts from this networkAnti-fraud limit (step 10).
You have already completed this offer on …The same person already did this offer, on your site or on another publisher's site. Each offer can be completed once per person.
Reward “Delivery retry pending/failed” in HistoryYour receiver did not answer 200 + ok. Check the postback log in Publish for the HTTP code, fix the receiver; queued rewards retry automatically.
“Could not … Reference: IP-XXXXXXXX”A server-side problem on our side. Send the reference to support – it identifies the exact error.

Known limits

Need help?

Contact support via the link in the footer. Include your website name, the user uid, the time, and any Reference shown in the error.