Developer Documentation

Gamwall Integration Docs

Integrate the Gamwall offerwall into your application using our secure offerwall URLs, iframe integrations, and postback tracking system.

Offerwall Integration

Use the following URL format to integrate the Gamwall offerwall into your website or mobile application.

https://gamwall.com/offerwall.php?placement_id=12&user_id=USER_123
Parameter Description Example
placement_id Your placement ID 12
user_id Your unique user identifier USER_123

Iframe Integration

Embed the Gamwall offerwall inside your platform using iframe integration.

<iframe src="https://gamwall.com/offerwall.php?placement_id=12&user_id=USER_123" width="100%" height="800" frameborder="0" style="border:none;border-radius:16px;"> </iframe>
Option Description
width="100%" Responsive full width
height="800" Offerwall frame height
border:none Removes iframe border

Postback Setup Guide

Use these macros in your Postback URL to receive conversion data in real time.

Postbacks are sent server-to-server from Gamwall's tracking domain — no browser/user-agent involved, so they'll never be blocked by ad blockers.
Always verify the request server-side before crediting a reward. At minimum: check for a valid transaction_id and reject anything already processed.
https://yourwebsite.com/postback.php?user_id={subid1}&offer_name={offer_name}&payout={payout}&reward={currency_amount}&transaction_id={conversion_id}&status={status}&ip={ip_address}&goal_id={goal_id}&goal_name={goal_title}
Macro Description Example Value
{subid1} Your User ID USER_123
{subid2} Your Placement ID 12
{offer_name} The completed offer name Coin Master
{offer_id} The offer/campaign ID 451
{payout} Payout amount in USD 0.75
{currency_amount} Reward amount in your currency 75
{currency_name} Your currency name Coins
{conversion_id} Unique conversion ID — use this for duplicate/chargeback tracking 93822
{click_id} The original click ID clk_8a92f1
{status} Conversion status approved / chargeback
{ip_address} User IP address 192.168.0.1
{goal_id} Multi-step Goal UID (only present for multi-step offers) sngCompleteRegistration
{goal_title} Multi-step Goal title (only present for multi-step offers) Reach Level 10
{step_number} Multi-step Goal sequence number (only present for multi-step offers) 2
{goal_id}, {goal_title}, and {step_number} are only sent for multi-step offers (e.g. Install → Reach Level 10 → Reach Level 50). For regular single-step offers these will simply be empty — you don't need to handle them unless you're integrating a multi-step campaign.

Sample Integration Code

Ready-to-use starter code for receiving Gamwall postbacks — pick whichever matches your stack.

Plain PHP

This is a minimal starting point — a full postback.php file you can drop into your project and adapt.
<?php
// postback.php — receives conversion postbacks from Gamwall

$user_id        = $_GET['user_id']        ?? '';
$offer_name     = $_GET['offer_name']     ?? '';
$payout         = (float)($_GET['payout'] ?? 0);
$reward         = (float)($_GET['reward'] ?? 0);
$conversion_id  = $_GET['transaction_id'] ?? '';
$status         = strtolower($_GET['status'] ?? '');
$ip             = $_GET['ip']             ?? '';

if (empty($user_id) || empty($conversion_id)) {
    http_response_code(400);
    echo json_encode(['success' => false, 'message' => 'Missing required parameters']);
    exit;
}

// 1) Duplicate check — always use conversion_id, not user_id/offer_name,
//    so multi-step offers and chargebacks are handled correctly.
$existing = db_find_conversion_by_id($conversion_id); // your own DB lookup

if ($existing && $existing['status'] === $status) {
    echo json_encode(['success' => false, 'message' => 'Duplicate transaction']);
    exit;
}

// 2) Handle status
if ($status === 'approved') {
    credit_user_balance($user_id, $reward);           // your own logic
} elseif ($status === 'chargeback') {
    deduct_user_balance($user_id, $reward);            // your own logic
}

// 3) Save/update the conversion record
save_conversion($conversion_id, $user_id, $offer_name, $payout, $reward, $status, $ip);

echo json_encode(['success' => true, 'message' => 'Reward added successfully']);

Laravel

Add the route, then handle it in a controller — mirrors the pattern used by real offerwall integrations.
// routes/web.php
Route::get('/postback/gamwall', [PostbackController::class, 'gamwall']);

// app/Http/Controllers/PostbackController.php
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Conversion;
use App\Models\User;

class PostbackController extends Controller
{
    public function gamwall(Request $request)
    {
        $userId        = $request->query('user_id');
        $offerName     = $request->query('offer_name');
        $payout        = (float) $request->query('payout', 0);
        $reward        = (float) $request->query('reward', 0);
        $conversionId  = $request->query('transaction_id');
        $status        = strtolower($request->query('status', ''));

        if (!$userId || !$conversionId) {
            return response()->json(['success' => false, 'message' => 'Missing parameters'], 400);
        }

        $user = User::find($userId);
        if (!$user) {
            return response()->json(['success' => false, 'message' => 'User not found'], 404);
        }

        // Duplicate check — keyed on conversion_id (works for chargebacks too)
        $existing = Conversion::where('conversion_id', $conversionId)->first();
        if ($existing && $existing->status === $status) {
            return response()->json(['success' => false, 'message' => 'Duplicate transaction']);
        }

        if ($status === 'approved') {
            $user->increment('balance', $reward);
        } elseif ($status === 'chargeback') {
            $user->decrement('balance', $reward);
        }

        Conversion::updateOrCreate(
            ['conversion_id' => $conversionId],
            [
                'user_id'    => $userId,
                'offer_name' => $offerName,
                'payout'     => $payout,
                'reward'     => $reward,
                'status'     => $status,
                'ip'         => $request->ip(),
            ]
        );

        return response()->json(['success' => true, 'message' => 'Reward added successfully']);
    }
}
Always key your duplicate check on {conversion_id}, never on {user_id} + {offer_name} alone — multi-step offers send multiple postbacks per user/offer. A chargeback status reverses a conversion that was previously approved, so make sure your endpoint can deduct, not just add. These samples are minimal starting points — add signature/IP verification once you're ready to go live.

Response Examples

Example JSON responses from your server after receiving a postback.

{ "success": true, "message": "Reward added successfully" }
{ "success": false, "message": "Duplicate transaction" }

Best Practices

Recommended Integration Tips

  • Always validate postbacks server-side
  • Prevent duplicate transaction IDs
  • Use HTTPS only
  • Store conversion logs
  • Validate payout amounts
  • Avoid iframe inside iframe
  • Use responsive layouts for mobile users