← WebsiteBookie API Ltd Docs
Sports APISlots APILive Casino APIWallet API3% GGR

BookieAPI Client Integration Documentation

Use this reference only together with the endpoint, credentials and authoritative documentation supplied for your activated third-party provider service.

Provider reference — not a hosted API
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/ggr

2. Base URLs

EnvironmentBase URLPurpose
Sandboxhttps://sandbox.provider.example/v1Testing and development
Productionhttps://api.provider.example/v1Live approved operator traffic
Keep your API Secret private. Never place it in frontend JavaScript, public GitHub repositories, mobile apps, or browser code.

3. Authentication

Every protected request must include API key, timestamp, and HMAC signature.

HeaderRequiredDescription
X-API-KeyYesYour BookieAPI public API key
X-TimestampYesCurrent Unix timestamp in seconds
X-SignatureYesHMAC-SHA256 signature generated using your API Secret
Content-TypeYesapplication/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.

GET/games
QueryExampleDescription
categoryslots, live_casino, sportsFilter by game category
providerevolution, pragmatic, ezugiFilter by provider
currencyUSDFilter 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.

GET/games?category=slots

Common Slot Providers

Pragmatic PlayJILIPG SoftHacksawNoLimit CityNetEnt

Launch Slot Game

POST/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.

GET/games?category=live_casino

Common Live Casino Types

Live RouletteLive BlackjackLive BaccaratDragon TigerSic BoGame Shows

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.

GET/sports

Response

{
  "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

POST/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.

POST/players

Request

{
  "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.

POST/games/launch

Request

{
  "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
}
Redirect the player to 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.

GET/players/{player_id}/balance
{
  "success": true,
  "player_id": "plr_1001",
  "balance": 500.00,
  "currency": "USD"
}
POST/wallet/bet
{
  "player_id": "plr_1001",
  "game_code": "pragmatic_sweet_bonanza",
  "round_id": "round_9001",
  "reference_id": "bet_9001",
  "amount": 10.00,
  "currency": "USD"
}
POST/wallet/win
{
  "player_id": "plr_1001",
  "game_code": "pragmatic_sweet_bonanza",
  "round_id": "round_9001",
  "reference_id": "win_9001",
  "amount": 25.00,
  "currency": "USD"
}
POST/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.

GET/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 Fee

13. Webhooks

BookieAPI can send important events to your callback URL.

EventDescription
game.session.startedA player opened a game session
wallet.betA bet transaction was created
wallet.winA win transaction was settled
wallet.rollbackA transaction was rolled back
ggr.report.generatedA 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

ErrorMeaningAction
invalid_api_keyAPI key is missing, wrong, or disabledCheck your operator API key
invalid_signatureHMAC signature mismatchCheck API secret and body format
operator_not_activeOperator package is not activeContact BookieAPI support
domain_not_allowedRequest domain is not whitelistedAdd domain from dashboard/support
game_not_foundInvalid game_codeRefresh games list
player_not_foundPlayer has not been created/syncedCreate player first
insufficient_balancePlayer balance is too lowStop bet and show balance error
duplicate_reference_idTransaction reference already existsReturn 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/launch or /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.

ChannelValue
Email[email protected]
Websitehttps://bookieapi.com
Docshttps://bookieapi.com/api-documentation/