Game Reseller API
Everything a reseller needs: register players, launch games, and move funds — with the same JSON envelope on every call.
Base URL
https://game.rongops.com/api
All endpoints are POST with an application/json body. /api/ping
accepts any method and needs no credentials.
Authentication
The platform administrator issues one API key and secret per reseller. There are two ways to prove who you are.
1. Key + secret headers
X-API-KEY: gk_live_9f2c...
X-API-SECRET: 7b1e...
2. Key + body signature (recommended)
Keep the secret off the wire. Send the key and an HMAC-SHA256 of the raw request body, keyed by the secret:
X-API-KEY: gk_live_9f2c...
X-SIGNATURE: 4f8d1c... # strtolower(hash_hmac('sha256', $rawBody, $secret))
Hex and base64 signatures are both accepted; a sha256= prefix is optional.
401.
Request format
Every response uses the same envelope:
{
"status": true,
"message": "OK",
"data": { ... }
}
Failures put a machine-readable code next to the message:
{
"status": false,
"code": "insufficient_balance",
"message": "The player balance is 50.00; cannot withdraw 100.00."
}
Error codes
| HTTP | code | Meaning |
|---|---|---|
| 400 | unknown_route | That endpoint does not exist |
| 401 | missing_api_key | No X-API-KEY header |
| 401 | invalid_api_key | Unknown key |
| 401 | invalid_secret | Wrong or missing secret |
| 401 | invalid_signature | Signature does not match the body |
| 401 | reseller_inactive | Account switched off by the admin |
| 404 | player_not_found | player_id was never created |
| 405 | method_not_allowed | Endpoint requires POST |
| 422 | invalid_player_id | Bad player id characters/length |
| 422 | invalid_amount | Amount is zero, negative or not a number |
| 422 | amount_too_small / amount_too_large | Outside the configured limits |
| 422 | insufficient_balance | Withdrawal exceeds the player balance |
| 422 | invalid_reference | Missing or too-long idempotency key |
| 422 | reference_failed | This reference was already used by a failed attempt |
| 502 | upstream_error | The game exchange refused or timed out |
| 503 | not_configured | Platform not initialised |
POST /api/ping
Health check. No authentication.
{ "status": true, "data": { "service": "RONGOPS Game API", "time": "2026-11-13T10:00:00+06:00" } }
POST /api/providers
The active game catalogue. Pass one of these code values as provider when
launching. Omitting it uses the default exchange.
{ "providers": [ { "code": "exchange", "name": "BetAPI Exchange", "vendor_code": "exchange", "logo": "" } ] }
POST /api/create-player
| Field | Type | Notes |
|---|---|---|
player_id required | string | Your own id for this player. 1–64 chars: A-Z a-z 0-9 _ - |
name optional | string | Display name |
currency optional | string | Defaults to the platform currency |
curl -X POST 'https://game.rongops.com/api/create-player' \
-H 'X-API-KEY: gk_live_...' -H 'X-API-SECRET: ...' \
-H 'Content-Type: application/json' \
-d '{"player_id":"player001","name":"Rahim"}'
{
"status": true,
"message": "Player created.",
"data": {
"player_id": "player001",
"username": "RSL123456_player001",
"name": "Rahim",
"currency": "BDT",
"balance": 0,
"status": "active",
"created_at": "2026-11-13 10:00:00"
}
}
player_id returns the existing player with message: "Player already exists."
— it never creates a duplicate.POST /api/game-url (alias: /api/launch)
| Field | Type | Notes |
|---|---|---|
player_id required | string | A player created earlier |
provider optional | string | A code from /api/providers |
{
"status": true,
"message": "Game launched.",
"data": {
"player_id": "player001",
"username": "RSL123456_player001",
"game_url": "https://...",
"provider": "exchange"
}
}
Open game_url in an iframe or redirect the player to it. Treat it as short-lived:
request a fresh URL on every launch.
POST /api/balance
{
"status": true,
"data": {
"player_id": "player001",
"balance": 500, // your ledger
"currency": "BDT",
"game_balance": 480.5 // live balance inside the game
}
}
balance is what you
credited through /api/deposit minus what you withdrew. game_balance is the
live figure after gameplay. Use the ledger for accounting and the game balance for gameplay checks.POST /api/deposit
| Field | Type | Notes |
|---|---|---|
player_id required | string | Target player |
amount required | number | Positive, within the configured limits |
reference required | string | Your idempotency key, 1–100 chars, unique per money move |
curl -X POST 'https://game.rongops.com/api/deposit' \
-H 'X-API-KEY: gk_live_...' -H 'X-API-SECRET: ...' \
-H 'Content-Type: application/json' \
-d '{"player_id":"player001","amount":500,"reference":"ORD-10001"}'
{
"status": true,
"message": "Deposit credited.",
"data": {
"player_id": "player001",
"type": "deposit",
"amount": 500,
"reference": "ORD-10001",
"transaction_id": 42,
"status": "success",
"balance": 500,
"currency": "BDT",
"duplicate": false
}
}
POST /api/withdraw
Same fields as deposit. The player's ledger balance must cover the amount.
{
"status": true,
"message": "Withdrawal completed.",
"data": { "type": "withdraw", "amount": 100, "balance": 400, "duplicate": false, ... }
}
POST /api/transactions
| Field | Type | Notes |
|---|---|---|
player_id optional | string | Filter to one player |
type optional | string | deposit / withdraw |
status optional | string | success / pending / failed |
search optional | string | Matches reference, upstream ref or player id |
page, limit optional | int | Default 1 / 50, max 200 |
{ "transactions": [ { "transaction_id": 42, "type": "deposit", "amount": 500,
"reference": "ORD-10001", "status": "success", "created_at": "2026-11-13 10:05:00" } ],
"total": 1, "page": 1, "limit": 50 }
POST /api/players
Paged list of your players. Accepts page and limit.
{ "players": [ { "player_id": "player001", "username": "RSL123456_player001",
"balance": 400, "status": "active" } ], "total": 1, "page": 1, "limit": 50 }
Idempotency
Every deposit and withdrawal requires a reference. The platform stores it with the
transaction and enforces uniqueness per reseller:
- A retry with the same reference after success returns the original result with
"duplicate": trueand moves no money. - A retry after a failed attempt returns
reference_failed. Use a fresh reference to try again. - Two simultaneous retries cannot both succeed — the second sees the first's row.
Integration flow
- Call
/api/create-playeronce when a user signs up. - Call
/api/depositwith your order id when the user pays. - Call
/api/game-urlwhen the user opens a game. - Call
/api/balancebefore showing a withdrawal form. - Call
/api/withdrawwith a new reference for each payout. - Reconcile with
/api/transactions.