Integrate Premium Games
Into Your Platform
REST API + WebSocket + Webhooks. Create a session, embed an iframe, and your players are live — no SDK downloads, no frontend code.
4
Live Games
<50ms
Latency
3
API Calls to Go Live
Go Live in 5 Steps
From signup to your first game session in under 10 minutes
Register
Create a business account via the portal or POST /api/business/register
Get API Key
Generate a bk_ key from the dashboard for server-to-server auth
Create Session
POST /api/auth/create-session with game slug and player ID
Embed Game
Load the returned URL in an iframe — game connects via WebSocket automatically
Receive Events
Get bet_placed and bet_result webhooks for every round
Game Catalog
Each game runs in-browser with real-time WebSocket multiplayer
Aviator
Crash game with live multiplier curve. Players cash out before the plane flies away.
slug: aviator
Mines
Grid-based risk game. Uncover gems to multiply winnings — hit a mine and lose it all.
slug: mines
High Low
Predict whether the next number is higher or lower. Simple, fast, and addictive.
slug: highlow1
Bead Road
Pattern-based prediction game with bead road scoring and AI opponents.
slug: bead12
Launch a Game in 3 Lines
One API call to create a session, one iframe to render the game
// 1. Create session (your backend → our API)
POST /api/auth/create-session
Headers:
x-api-key: bk_live_abc123...
Body:
{
"game_slug": "aviator",
"user_uuid": "your-player-id-123",
"meta": { "username": "player1" }
}
Response:
{
"success": true,
"session": {
"token": "sess_abc123...",
"gameUrl": "/games/aviator?token=sess_abc123..."
}
}
// 2. Embed in your page
<iframe src="https://your-platform.com/games/aviator?token=sess_abc123..." />
API Reference
Two auth modes: Session Token for dashboard ops, API Key for server-to-server
Authentication & Account
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/business/register | Public | Create business account |
| POST | /api/business/login | Public | Get session token |
| GET | /api/business/profile | Session | Get business details |
| PUT | /api/business/profile | Session | Update profile, webhook URL, API URL |
API Keys
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/business/api-keys | Session | Generate new API key (bk_...) |
| GET | /api/business/api-keys | Session | List all API keys |
| DEL | /api/business/api-keys/:key_uuid | Session | Revoke an API key |
Game Configuration
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/business/games | API Key | List all available games |
| GET | /api/business/game-configs | Session | List per-business configs for all games |
| GET | /api/business/game-configs/:game_id | Session | Get config for one game |
| GET | /api/business/game-configs/lookup | Session | Lookup by game_uuid or game_slug |
| PUT | /api/business/game-configs/:game_id | Session | Update min/max bet, house edge, enable/disable |
| POST | /api/business/games/initialize-defaults | Session | Bulk-init default configs for all games |
Session Management
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/auth/create-session | API Key | Create a game session for a player |
| POST | /api/auth/validate-session | API Key | Validate an existing session token |
| GET | /api/auth/games | Public | List available games (public) |
Webhook Events
Real-time HTTP notifications delivered to your webhookUrl with HMAC-SHA256 signatures
Fired when a player places a bet
userId— your external player IDgameId— game slugroundId— unique round identifieramount— bet amountcurrency— e.g. PKR
Fired when a game round completes
outcome—winorlosswinAmount— payout amountmultiplier— e.g. 2.5betAmount— original betroundId— matching round ID
Fired on any balance change
previousBalance— before changenewBalance— after changechangeAmount— deltareason— e.g.game_win
Headers: X-Webhook-Signature (HMAC-SHA256)
· X-Webhook-Timestamp (unix ms)
· Retries: 5 attempts with exponential backoff
Your Balance API
You implement 3 endpoints — we call them with X-API-Secret authentication
Get Balance
GET {apiUrl}/users/{userId}/balanceReturns { balance, currency }. Called before and during gameplay. 5s timeout.
Debit (Bet)
POST {apiUrl}/debitAtomic balance check + deduction. Must handle duplicate transactionId. 10s timeout.
Credit (Win / Refund)
POST {apiUrl}/creditAdd funds for wins (outcome: win) or refunds. Also records losses (amount: 0). 10s timeout.
Built for Operators
Enterprise infrastructure that scales with your platform
HMAC-SHA256 Security
Every webhook is signed. API keys are scoped to permissions. All transactions are idempotent.
Real-Time WebSocket
Socket.IO-based gameplay with instant bet confirmation, live multiplier curves, and zero-lag results.
Full Control
Set min/max bets, house edge, and enable/disable per game. Configure refresh intervals for live configs.
Ready to Integrate?
Create your business account, get an API key, and launch your first game — all in under 10 minutes.