Overview
Marwadi91 API for integrating casino games. All responses are JSON. Base URL is your assigned gateway.
Base URL
https://api.geobaji.siteFormatJSON
SecurityHMAC-SHA256 + API Key
Authentication
Every request needs a valid HMAC-SHA256 signature. You receive an API Key and Client Secret from the master panel.
Signature Generation
data = api_key + "|" + user_id + "|" + game_uid + "|" + balance + "|" + ts
sig = hash_hmac('sha256', data, client_secret)
Security Layers
| API Key | Identifies your account. Sent as query param. |
| HMAC Signature | Valid for 120 seconds. Uses ts + sig params. |
| IP Whitelist | Optional. Restrict access to specific IPs. |
Launch API
Creates a game session and returns a game URL to redirect or embed the player.
GET
POST
https://api.geobaji.site/v1/launch
Parameters
| api_key * | Your client API key |
| user_id * | Unique player ID |
| game_uid * | Game identifier |
| balance | Player balance (optional if in DB) |
| ts * | Unix timestamp (seconds or ms) |
| sig * | HMAC-SHA256 signature |
| currency_code | INR (default) |
| language | en (default) |
Response
{"ok": true, "game_url": "https://provider.com/game?token=xyz", "balance_used": "500.00"}
Default: HTTP 302 redirect. Add ?format=json for JSON.
Callback API
Providers send round results here. System updates balances and deducts GGR on losses.
POST
https://api.geobaji.site/v1/callback?client=CLIENT_UUID
Request
{"game_uid": "3978","game_round": "RND123456","member_account": "user_9982","bet_amount": 100.00,"win_amount": 150.00}
Response
{"credit_amount": 550.00,"timestamp": 1712345678000}
Flow
- Provider sends round result
- System looks up the session saved at launch
- Updates user balance: balance - bet + win
- On player loss: GGR deducted from wallet
- Forwards result to client's callback URL
GGR System
Platform commission deducted on player losses.
Commission = (Bet - Win) x (GGR% / 100)
Example: Bet 100, Win 0, GGR 10% → Commission = 10
Win or break-even → No deduction
How It Works
- Each client has
ggr_balance(default 10%) - Auto-deducted in callback on player loss
- Atomic deduction — wallet never < 0
- Logged in
ggr_transactionstable - No double deduction (via
ggr_deductedflag)
GGR Deduct Endpoint
POST
https://api.geobaji.site/v1/ggr-deduct
{"api_key": "your_key","user_id": "user_9982","game_uid": "3978","bet": 100.00,"win": 0.00,"loss": 100.00}
Providers API
GET
https://api.geobaji.site/api/v1/providers?api_key=YOUR_KEY
{"ok": true,"count": 5,"providers": [{"name": "Provider A","games_count": 120}]}
GET
https://api.geobaji.site/api/v1/games?api_key=YOUR_KEY&provider=ID
{"ok": true,"count": 50,"games": [{"game_uid": "3978","name": "Game Name"}]}
Error Codes
| Invalid API Key | 401 | Key not found or inactive |
| Invalid signature | 401 | HMAC verification failed |
| Signature expired | 401 | Timestamp diff > 120s |
| IP not whitelisted | 403 | IP not in whitelist |
| low_ggr_balance | 403 | GGR set but wallet empty |
| Game provider error | 502 | Upstream provider error |
Code Examples
PHP
<?php
$apiKey = 'YOUR_API_KEY';
$clientSecret = 'YOUR_CLIENT_SECRET';
$userId = 'player123';
$gameUid = '3978';
$balance = '500.00';
$ts = time();
$payload = "$apiKey|$userId|$gameUid|$balance|$ts";
$sig = hash_hmac('sha256', $payload, $clientSecret);
$url = "https://api.geobaji.site/v1/launch?api_key=" . urlencode($apiKey) . "&user_id=" . urlencode($userId) . "&game_uid=" . urlencode($gameUid) . "&balance=" . urlencode($balance) . "&ts=" . $ts . "&sig=" . $sig;
header("Location: $url");
Python
import hashlib, hmac, time, urllib.parse
api_key = "YOUR_API_KEY"
secret = "YOUR_CLIENT_SECRET"
user_id = "player123"
game_uid = "3978"
balance = "500.00"
ts = str(int(time.time()))
payload = f"{api_key}|{user_id}|{game_uid}|{balance}|{ts}"
sig = hmac.new(secret.encode(), payload.encode(), hashlib.sha256).hexdigest()
params = urllib.parse.urlencode({"api_key": api_key, "user_id": user_id, "game_uid": game_uid, "balance": balance, "ts": ts, "sig": sig})
url = f"https://api.geobaji.site/v1/launch?{params}"
print(f"Redirect: {url}")
Node.js
const crypto = require('crypto');
const apiKey = 'YOUR_API_KEY';
const secret = 'YOUR_CLIENT_SECRET';
const userId = 'player123';
const gameUid = '3978';
const balance = '500.00';
const ts = Math.floor(Date.now() / 1000);
const payload = `${apiKey}|${userId}|${gameUid}|${balance}|${ts}`;
const sig = crypto.createHmac('sha256', secret).update(payload).digest('hex');
const params = new URLSearchParams({api_key: apiKey, user_id: userId, game_uid: gameUid, balance, ts, sig});
const url = `https://api.geobaji.site/v1/launch?${params}`;
console.log('Redirect:', url);