Introduction
Welcome to Phoenix Games Integration Guide
Phoenix Games Integration Guide
Welcome to Phoenix Games! This guide walks you through integrating Phoenix games into your platform.
Integration Flow
1. Setup & Configuration
- Register as an operator with Phoenix Games
- Generate RSA key pairs for secure communication
- Request game instances with your preferred configuration
2. Backend Implementation
- Token Generation: Create JWT tokens with player balance for game sessions
- Webhook Endpoints: Implement endpoints to handle game transactions:
/withdraw
- Process bets and deductions/deposit
- Handle wins and credits/rollback
- Reverse transactions when needed/player-balance
- Provide current balance checks
3. Frontend Integration
- Embed games via iframe with authenticated tokens
- Handle real-time events between your platform and games
- Manage player sessions and balance updates
How It Works
- Player starts a game → Your backend generates a JWT token with the player's current balance
- Game makes a bet → Phoenix sends a withdraw request to your webhook
- Player wins → Phoenix sends a deposit request to credit winnings
- Throughout gameplay → Balance queries and event exchanges keep everything synchronized
All communication is secured with RSA signatures and validated on both ends.
Before Going Live
Before launching in production, we verify everything works as expected through comprehensive testing of your integration endpoints and game flows.