Quick Start
This guide walks you through the essential steps to integrate Beexar games into your platform.
Integration Workflow
Section titled “Integration Workflow”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 }
Prerequisites
Section titled “Prerequisites”- 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
Step-by-Step
Section titled “Step-by-Step”-
Implement the Wallet API
Your platform must expose 4 HTTP endpoints that Beexar will call during gameplay:
Endpoint Purpose Direction POST /balanceReturn current player balance Beexar → Operator POST /betwinDebit and/or credit the player (atomic) Beexar → Operator POST /rollbackReverse previous transactions Beexar → Operator POST /finishSignal round completion Beexar → Operator See the Wallet API Overview for detailed specifications.
-
Validate Request Signatures
Every request from Beexar includes an
X-REQUEST-SIGNheader 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 valueSee Authentication for code samples in multiple languages.
-
Configure Callback URLs
In the Beexar backoffice, configure your 4 callback URLs for the operator:
Setting Example Balance URL https://casino.example.com/wallet/balanceBetWin URL https://casino.example.com/wallet/betwinRollback URL https://casino.example.com/wallet/rollbackFinish URL https://casino.example.com/wallet/finishSee Backoffice: API Keys & Callbacks for a step-by-step guide with screenshots.
-
Launch a Game Session
To start a game for a player, send a
POST /api/v1/softswiss/launcher/realrequest 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..."} -
Embed the Game
Embed the returned
launch_urlin an iframe on your page:<iframesrc="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.
What Happens During Gameplay
Section titled “What Happens During Gameplay”Once the player starts playing, Beexar automatically sends wallet requests to your callback URLs:
- Balance check — Beexar fetches the current balance when the game loads
- BetWin — Player places a bet (and wins), Beexar sends
POST /betwinwith bet and win transactions atomically - Rollback — If an error occurs, Beexar sends
POST /rollbackto reverse the transactions - Finish — If the round was not closed by
finished: truein BetWin, Beexar sendsPOST /finish
Next Steps
Section titled “Next Steps”- Authentication — HMAC-SHA256 signing details and code samples
- Wallet API Reference — detailed endpoint documentation
- Error Handling — error codes and retry strategies
- Integration Test Game — automated 29-test validation suite