BookieAPI Client Integration Documentation
Use this reference only together with the endpoint, credentials and authoritative documentation supplied for your activated third-party provider service.
This storefront does not implement the example routes shown below. Routes, response bodies and provider names are illustrative only. Never connect production traffic until an approved provider supplies the real base URL, credentials, callback rules and authoritative documentation.
1. Integration Flow
After purchasing a package, BookieAPI will provide your API Key, API Secret, allowed domain, and callback configuration.
1. Get Credentials
Receive API Key and API Secret from BookieAPI after package activation.
2. Sync Player
Create or sync your website players with BookieAPI using your own external user ID.
3. Launch Product
Call launch API for slots, live casino, or sports and redirect users to launch_url.
Client Website → BookieAPI /games → Show games
Client Website → BookieAPI /players → Create/sync player
Client Website → BookieAPI /games/launch → Receive launch_url
User plays game → Wallet callbacks handle bet/win/rollback
Client checks GGR → /reports/ggr2. Base URLs
| Environment | Base URL | Purpose |
|---|---|---|
| Sandbox | https://sandbox.provider.example/v1 | Testing and development |
| Production | https://api.provider.example/v1 | Live approved operator traffic |
3. Authentication
Every protected request must include API key, timestamp, and HMAC signature.
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your BookieAPI public API key |
X-Timestamp | Yes | Current Unix timestamp in seconds |
X-Signature | Yes | HMAC-SHA256 signature generated using your API Secret |
Content-Type | Yes | application/json |
4. HMAC Signature
Create the signature from timestamp + request body.
signaturePayload = timestamp + "." + JSON.stringify(requestBody)
signature = HMAC_SHA256(signaturePayload, API_SECRET)Node.js Signature
const crypto = require("crypto");
function createSignature(body, timestamp, apiSecret) {
const payload = timestamp + "." + JSON.stringify(body || {});
return crypto.createHmac("sha256", apiSecret).update(payload).digest("hex");
}5. Games API
Use this endpoint to fetch all available products: slots, live casino, and sports.
/games| Query | Example | Description |
|---|---|---|
category | slots, live_casino, sports | Filter by game category |
provider | evolution, pragmatic, ezugi | Filter by provider |
currency | USD | Filter supported currency |
Response
{
"success": true,
"data": [
{
"game_code": "pragmatic_sweet_bonanza",
"game_name": "Sweet Bonanza",
"provider": "pragmatic",
"category": "slots",
"status": "active",
"thumbnail_url": "https://cdn.bookieapi.com/games/pragmatic_sweet_bonanza.png"
},
{
"game_code": "evolution_blackjack_vip",
"game_name": "VIP Blackjack",
"provider": "evolution",
"category": "live_casino",
"status": "active",
"thumbnail_url": "https://cdn.bookieapi.com/games/evolution_blackjack_vip.png"
}
]
}6. Slots API
Slots are returned under category=slots. Operators should display slots by provider, popularity, or game type.
/games?category=slotsCommon Slot Providers
Launch Slot Game
/games/launch{
"player_id": "plr_1001",
"game_code": "pragmatic_sweet_bonanza",
"product_type": "slots",
"language": "en",
"return_url": "https://operator.com/casino/slots"
}7. Live Casino API
Live casino games are returned under category=live_casino. Supported products can include blackjack, roulette, baccarat, dragon tiger, sic bo, and game shows.
/games?category=live_casinoCommon Live Casino Types
Launch Live Casino Game
{
"player_id": "plr_1001",
"game_code": "evolution_blackjack_vip",
"product_type": "live_casino",
"language": "en",
"return_url": "https://operator.com/live-casino"
}8. Sports API
Sports products are returned under category=sports. Sports launch can open the BookieAPI sportsbook interface or a provider sportsbook session.
/sportsResponse
{
"success": true,
"data": [
{ "sport_code": "football", "sport_name": "Football", "status": "active" },
{ "sport_code": "cricket", "sport_name": "Cricket", "status": "active" },
{ "sport_code": "basketball", "sport_name": "Basketball", "status": "active" },
{ "sport_code": "tennis", "sport_name": "Tennis", "status": "active" }
]
}Launch Sportsbook
/sports/launch{
"player_id": "plr_1001",
"sport_code": "football",
"language": "en",
"return_url": "https://operator.com/sports"
}9. Players API
Create or sync players before launching any product. Use your own user ID as external_player_id.
/playersRequest
{
"external_player_id": "user_1001",
"username": "john_player",
"currency": "USD",
"country": "BR"
}Response
{
"success": true,
"player_id": "plr_1001",
"external_player_id": "user_1001",
"currency": "USD",
"status": "active"
}10. Universal Launch API
Use one launch endpoint for slots, live casino, and supported sports products.
/games/launchRequest
{
"player_id": "plr_1001",
"game_code": "pragmatic_sweet_bonanza",
"product_type": "slots",
"language": "en",
"device": "desktop",
"return_url": "https://operator.com/casino"
}Response
{
"success": true,
"session_id": "sess_abc123",
"launch_url": "https://play.bookieapi.com/session/sess_abc123",
"expires_in": 900
}launch_url from your backend or frontend after receiving a successful response.11. Wallet API
BookieAPI supports wallet transaction flow for bet, win, refund, and rollback. Each transaction must use a unique reference_id.
/players/{player_id}/balance{
"success": true,
"player_id": "plr_1001",
"balance": 500.00,
"currency": "USD"
}/wallet/bet{
"player_id": "plr_1001",
"game_code": "pragmatic_sweet_bonanza",
"round_id": "round_9001",
"reference_id": "bet_9001",
"amount": 10.00,
"currency": "USD"
}/wallet/win{
"player_id": "plr_1001",
"game_code": "pragmatic_sweet_bonanza",
"round_id": "round_9001",
"reference_id": "win_9001",
"amount": 25.00,
"currency": "USD"
}/wallet/rollback{
"original_reference_id": "bet_9001",
"reference_id": "rollback_9001",
"reason": "round_cancelled"
}12. GGR Reports
Use GGR reports to calculate revenue share, operator performance, provider performance, and settlement amount.
/reports/ggr?from=2026-05-01&to=2026-05-31{
"success": true,
"summary": {
"total_bet": 100000,
"total_win": 82000,
"total_refund": 1000,
"ggr": 17000,
"bookieapi_fee_rate": 3,
"bookieapi_fee": 510,
"operator_share": 16490
},
"breakdown": [
{
"provider": "pragmatic",
"category": "slots",
"total_bet": 60000,
"total_win": 49000,
"ggr": 11000,
"bookieapi_fee": 330
},
{
"provider": "evolution",
"category": "live_casino",
"total_bet": 40000,
"total_win": 33000,
"ggr": 7000,
"bookieapi_fee": 210
}
]
}Formula
GGR = Total Bets - Total Wins - Total Refunds
BookieAPI Fee = Positive GGR × 3%
Operator Share = GGR - BookieAPI Fee13. Webhooks
BookieAPI can send important events to your callback URL.
| Event | Description |
|---|---|
game.session.started | A player opened a game session |
wallet.bet | A bet transaction was created |
wallet.win | A win transaction was settled |
wallet.rollback | A transaction was rolled back |
ggr.report.generated | A GGR report was generated |
{
"event": "wallet.bet",
"timestamp": "2026-05-26T12:00:00Z",
"data": {
"player_id": "plr_1001",
"game_code": "pragmatic_sweet_bonanza",
"round_id": "round_9001",
"reference_id": "bet_9001",
"amount": 10,
"currency": "USD"
}
}14. Error Codes
| Error | Meaning | Action |
|---|---|---|
invalid_api_key | API key is missing, wrong, or disabled | Check your operator API key |
invalid_signature | HMAC signature mismatch | Check API secret and body format |
operator_not_active | Operator package is not active | Contact BookieAPI support |
domain_not_allowed | Request domain is not whitelisted | Add domain from dashboard/support |
game_not_found | Invalid game_code | Refresh games list |
player_not_found | Player has not been created/synced | Create player first |
insufficient_balance | Player balance is too low | Stop bet and show balance error |
duplicate_reference_id | Transaction reference already exists | Return original transaction result |
15. Code Examples
cURL Launch Game
curl -X POST "https://api.provider.example/v1/games/launch" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Timestamp: 1710000000" \
-H "X-Signature: GENERATED_SIGNATURE" \
-d '{
"player_id": "plr_1001",
"game_code": "pragmatic_sweet_bonanza",
"product_type": "slots",
"language": "en",
"return_url": "https://operator.com/casino"
}'JavaScript Fetch
async function launchGame() {
const body = {
player_id: "plr_1001",
game_code: "pragmatic_sweet_bonanza",
product_type: "slots",
language: "en",
return_url: "https://operator.com/casino"
};
const response = await fetch("https://api.provider.example/v1/games/launch", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY",
"X-Timestamp": "1710000000",
"X-Signature": "GENERATED_SIGNATURE"
},
body: JSON.stringify(body)
});
const data = await response.json();
if (data.success) window.location.href = data.launch_url;
}PHP Signature + Request
<?php
$apiKey = "YOUR_API_KEY";
$apiSecret = "YOUR_API_SECRET";
$timestamp = time();
$body = [
"player_id" => "plr_1001",
"game_code" => "pragmatic_sweet_bonanza",
"product_type" => "slots",
"language" => "en",
"return_url" => "https://operator.com/casino"
];
$payload = $timestamp . "." . json_encode($body);
$signature = hash_hmac("sha256", $payload, $apiSecret);
$ch = curl_init("https://api.provider.example/v1/games/launch");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"X-API-Key: " . $apiKey,
"X-Timestamp: " . $timestamp,
"X-Signature: " . $signature
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>16. Client Integration Checklist
- Receive API Key and API Secret from BookieAPI.
- Set your allowed domain and callback URL.
- Implement server-side HMAC signature generation.
- Create or sync players with
/players. - Fetch slots, live casino, and sports list.
- Launch selected product using
/games/launchor/sports/launch. - Handle wallet balance, bet, win, and rollback logic.
- Store transaction reference IDs safely.
- Check GGR reports daily/monthly.
- Move from sandbox to production after testing.
17. Support
For package activation, API credentials, provider enablement, settlement, or technical integration support, contact BookieAPI.
| Channel | Value |
|---|---|
[email protected] | |
| Website | https://bookieapi.com |
| Docs | https://bookieapi.com/api-documentation/ |