Integration Overview
Integrating with Game Provider involves two main components:
- Game Launch: Requesting a game session via the Game Launch API and embedding the game iframe.
- Wallet API: Implementing a set of endpoints on your backend to handle Balance, Bet, and Win requests.
Architecture
The integration follows a standard server-to-server communication model.
- Client: Your player's browser loads the Game Provider game.
- Game Provider Server: Manages game logic and communicates with your wallet.
- Operator Server (You): Validates sessions and processes transactions.
Integration Flow
sequenceDiagram
participant P as Player (Browser)
participant O as Operator (Your Backend)
participant FS as Game Provider Platform
P->>O: Click "Play Game"
O->>FS: GET /launch (with userToken)
FS-->>O: Return launch_url
O-->>P: Redirect to launch_url
P->>FS: Load Game Iframe
FS->>O: POST /auth (Validate session)
O-->>FS: 200 OK (Balance, UserID)
Note over P, FS: Game Started
P->>FS: Place Bet
FS->>O: POST /withdraw (BET)
O-->>FS: 200 OK (New Balance)
FS-->>P: Show Result
Note over P, FS: Win Occurs
FS->>O: POST /deposit (WIN)
O-->>FS: 200 OK (New Balance)
FS-->>P: Update UI
Refer to the Wallet API section for detailed protocol specifications.