Skip to content

Quick Start

This guide walks you through the essential steps to integrate Beexar games into your platform.

sequenceDiagram
    participant Operator
    participant Beexar as Beexar Gateway
    participant Game as Game Frontend

    Note over Operator,Beexar: 1. Setup Phase
    Operator->>Operator: Implement 4 wallet callback endpoints
    Operator->>Beexar: Register callback URLs via backoffice

    Note over Operator,Game: 2. Game Launch
    Operator->>Beexar: POST /api/v1/softswiss/launcher/real (player + game)
    Beexar-->>Operator: { launch_url }
    Operator->>Game: Embed launch_url in iframe

    Note over Operator,Game: 3. Gameplay Loop
    Game->>Beexar: Player places bet
    Beexar->>Operator: POST /betwin (bet + win, atomic)
    Operator-->>Beexar: { balance, transactions }
  • An active Beexar operator account
  • An operator slug (casino_id) and API secret (AUTH_TOKEN), generated in the backoffice
  • A publicly accessible HTTPS server to receive wallet callbacks

  1. Implement the Wallet API

    Your platform must expose 4 HTTP endpoints that Beexar will call during gameplay:

    Endpoint Purpose Direction
    POST /balance Return current player balance Beexar → Operator
    POST /betwin Debit and/or credit the player (atomic) Beexar → Operator
    POST /rollback Reverse previous transactions Beexar → Operator
    POST /finish Signal round completion Beexar → Operator

    See the Wallet API Overview for detailed specifications.

  2. Validate Request Signatures

    Every request from Beexar includes an X-REQUEST-SIGN header containing an HMAC-SHA256 signature. Always validate this before processing:

    Terminal window
    # Signature = HMAC-SHA256(request_body, AUTH_TOKEN)
    # Compare with X-REQUEST-SIGN header value

    See Authentication for code samples in multiple languages.

  3. Configure Callback URLs

    In the Beexar backoffice, configure your 4 callback URLs for the operator:

    Setting Example
    Balance URL https://casino.example.com/wallet/balance
    BetWin URL https://casino.example.com/wallet/betwin
    Rollback URL https://casino.example.com/wallet/rollback
    Finish URL https://casino.example.com/wallet/finish

    See Backoffice: API Keys & Callbacks for a step-by-step guide with screenshots.

  4. Launch a Game Session

    To start a game for a player, send a POST /api/v1/softswiss/launcher/real request to the Beexar Gateway:

    Terminal window
    BODY='{"casino_id":"your-operator-slug","game":"dice","account":{"id":"player_123","currency":"USD"}}'
    SIGNATURE=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "your_api_secret" | awk '{print $2}')
    curl -X POST https://gateway.beexar.com/api/v1/softswiss/launcher/real \
    -H "Content-Type: application/json" \
    -H "X-REQUEST-SIGN: $SIGNATURE" \
    -d "$BODY"

    Response:

    {
    "launch_url": "https://games.beexar.com/dice/your-operator-slug/dice-game?token=a1b2c3..."
    }
  5. Embed the Game

    Embed the returned launch_url in an iframe on your page:

    <iframe
    src="https://games.beexar.com/dice/your-operator-slug/dice-game?token=a1b2c3..."
    style="width: 100%; height: 100%; border: none;"
    allow="autoplay"
    ></iframe>

    See Game Launch for responsive design and CSP configuration.


Once the player starts playing, Beexar automatically sends wallet requests to your callback URLs:

  1. Balance check — Beexar fetches the current balance when the game loads
  2. BetWin — Player places a bet (and wins), Beexar sends POST /betwin with bet and win transactions atomically
  3. Rollback — If an error occurs, Beexar sends POST /rollback to reverse the transactions
  4. Finish — If the round was not closed by finished: true in BetWin, Beexar sends POST /finish