API Documentation

REST API. Authentication via headers. JSON request/response.

Authentication

Har request me ye headers bhejein:

X-UID: UID_XXXXXXXX
X-API-KEY: gpk_xxxxx
X-API-SECRET: gps_xxxxx
Origin: https://your-whitelisted-domain.com (recommended)

Endpoints

/api/v1/game/list

Fetch available games with image and metadata.

GET
/api/v1/user/create

Create a player on your platform.

POST
/api/v1/user/balance

Read wallet balance for a player.

GET
/api/v1/user/update_balance

Credit or debit balance from your system.

POST
/api/v1/game/launch

Generate a launch URL for a specific game.

POST
/api/v1/game/callback

Receive win and bet callbacks from the provider.

POST

PHP Example: Game List

<?php
$uid = 'UID_XXXXXXXX';
$apiKey = 'your_api_key';
$apiSecret = 'your_api_secret';

$ch = curl_init('https://api.example.com/api/v1/game/list');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-UID: ' . $uid,
    'X-API-KEY: ' . $apiKey,
    'X-API-SECRET: ' . $apiSecret,
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
foreach ($data['data']['games'] as $game) {
    echo $game['game_name'] . PHP_EOL;
}

Wallet Sync Model

  • Use UID to identify the customer package and its whitelisted domain.
  • Use API key and secret to authenticate each request from your backend.
  • Players are stored locally under your approved package, so balance APIs remain fast and idempotent.
  • Game catalog is proxied from Slotspull in real time. First private external API try hota hai, fallback me public Slotspull catalog use hota hai.
  • Game launch pehle private Slotspull launch try karta hai; shared Slotspull session sirf optional fallback hai jab private launch available na ho.
  • AES key is issued with the package for future encrypted callback/signing workflows.
  • `user/create`, `user/balance`, `user/update_balance`, `game/launch`, aur `game/callback` responses me `package_balance` aur `credit_alert` fields mil sakte hain. Inse aap client panel me low-credit warning dikha sakte hain.

PHP Example: Update Balance

<?php
$payload = json_encode([
    'player_id' => 'player-1001',
    'type' => 'credit',
    'amount' => 500,
    'transaction_id' => 'txn_5001',
    'note' => 'Manual topup',
]);

$ch = curl_init('https://api.example.com/api/v1/user/update_balance');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'X-UID: UID_XXXXXXXX',
    'X-API-KEY: your_api_key',
    'X-API-SECRET: your_api_secret',
]);