Platform Features
White Label System
Fully customizable branding with your own logo, theme colors, app name, and currency support.
USDT Payment Integration
Accept deposits and process withdrawals via TRC20 and BEP20 networks with automatic confirmation.
Subscription Management
Automated plan upgrades, renewals, and expiry handling with Basic, Pro, and Enterprise tiers.
API Key Management
Secure API key and secret key generation with IP whitelisting and rate limiting per client.
Provably Fair Algorithm
Cryptographically verifiable game outcomes using SHA-512 hashing with client seed verification.
Real-time Webhooks
Instant event notifications for player actions, game results, deposits, and subscription changes.
Technology Stack
| Component | Technology | Version | Description |
| Backend | PHP | 8.2+ | Core PHP with PDO for database operations |
| Database | MySQL / MariaDB | 8.0+ / 10.11+ | Relational database with InnoDB engine |
| Web Server | Apache / Nginx | 2.4+ / 1.18+ | With mod_rewrite / URL rewriting enabled |
| Frontend | HTML5, CSS3, Bootstrap 5 | 5.3+ | Responsive admin and client dashboards |
| Charts | Chart.js | 3.x+ | Analytics and reporting visualizations |
| Auth | JWT (HS256) | - | JSON Web Tokens with HMAC-SHA256 signing |
| Payments | USDT (TRC20/BEP20) | - | Crypto deposits and withdrawals |
System Requirements
PHP 8.2+, MySQL 8.0+, Apache/Nginx with mod_rewrite, SSL Certificate, 2GB+ RAM, 20GB+ Storage.
Required PHP extensions: pdo_mysql, openssl, mbstring, json, curl.
Authentication
All API requests require authentication using your API key and secret key. You can obtain these from your client dashboard after registration.
The platform supports two authentication methods:
- API Key + Secret Key - Used for server-to-server authentication
- JWT Token - Used for game session launches and player-specific operations
1. API Key Authentication
Include your API key in the request header for all API calls:
X-API-Key: your_api_key_here
2. Auth Endpoint (Get JWT Token)
POST
/api/auth
Exchange your API key and secret key for a JWT token that can be used to launch game sessions.
Request Body
| Parameter | Type | Required | Description |
| api_key | string | Required | Your API key (or send via X-API-Key header) |
| secret_key | string | Required | Your secret key |
| member_id | string | Optional | Member ID from your system |
| game_uid | string | Optional | Game unique identifier |
| credit_amount | number | Optional | Initial credit amount |
| currency_code | string | Optional | Currency code (default: INR) |
| return_url | string | Optional | URL to redirect after game session |
Example Request
curl -X POST "https://mtxglobal.buzz/api/auth" \\
-H "Content-Type: application/json" \\
-d '{
"api_key": "94b24496db4ffe1ba594ac01316f0003c1866199",
"secret_key": "59281a6760556a22197423cbea0753fe07d7bc95adc5afe4aeb67b5acfc8e4e2",
"member_id": "player_001",
"currency_code": "USD",
"return_url": "https://yourcasino.com/return"
}'
Example Response
{
"code": 0,
"msg": "Success",
"msgCode": 0,
"data": {
"url": "https://mtxglobal.buzz/api/game/launch.php?token=eyJ0eXAiOiJKV1Qi...",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"returnType": "1"
}
}
Security Notice
Never expose your secret_key in client-side code. The auth endpoint should only be called from your backend server. JWT tokens expire after 24 hours (configurable via JWT_EXPIRY).
Base URL & Headers
https://mtxglobal.buzz/api/
Content-Type: application/json
X-API-Key: your_api_key_here
Pricing Plans
Basic
$99/month
- 10,000 API requests/month
- All 10+ games included
- Basic webhook support
- Email support
- Standard RTP settings
Pro
$199/month
- 50,000 API requests/month
- All 10+ games included
- Priority webhook delivery
- Priority email support
- Custom game settings
- Advanced analytics
Enterprise
Custom
- Unlimited API requests
- All 10+ games + custom
- Dedicated webhook infrastructure
- 24/7 dedicated support
- Fully customizable RTP
- White-label mobile apps
- SLA guarantee
Create Player
Create a new player in your platform. Players are unique per client and can be identified by your system's player_id.
POST
/api/player/create
Request Body
| Parameter | Type | Required | Description |
| player_id | string | Required | Unique player ID from your system (max 100 chars) |
| username | string | Optional | Player display name |
| initial_balance | decimal | Optional | Starting balance (default: 0.00) |
Example Request
curl -X POST "https://mtxglobal.buzz/api/player/create" \\
-H "Content-Type: application/json" \\
-H "X-API-Key: your_api_key" \\
-d '{
"player_id": "player_123",
"username": "JohnDoe",
"initial_balance": 1000.00
}'
Example Response
{
"success": true,
"message": "Player created successfully",
"data": {
"player_id": "player_123",
"username": "JohnDoe",
"balance": 1000.00,
"status": "active",
"created_at": "2026-07-04 10:30:00"
}
}
Credit Player
Add funds to a player's balance. This is typically used when a player makes a deposit on your platform.
POST
/api/player/credit
| Parameter | Type | Required | Description |
| player_id | string | Required | Player ID |
| amount | decimal | Required | Amount to credit (must be > 0) |
| reference | string | Optional | Transaction reference ID |
Debit Player
Deduct funds from a player's balance. This is typically used when a player requests a withdrawal.
POST
/api/player/debit
| Parameter | Type | Required | Description |
| player_id | string | Required | Player ID |
| amount | decimal | Required | Amount to debit (must be > 0) |
| reference | string | Optional | Transaction reference ID |
Important
Debit operations will fail if the player has insufficient balance. Always check the player's balance before attempting a debit.
Get Player Balance
Retrieve a player's current balance, total wagered, total won, and game statistics.
GET
/api/player/balance?player_id=player_123
Query Parameters
| Parameter | Type | Required | Description |
| player_id | string | Required | Player ID |
Example Response
{
"success": true,
"data": {
"player_id": "player_123",
"balance": 850.50,
"total_wagered": 500.00,
"total_won": 350.50,
"total_games": 42,
"status": "active",
"last_login": "2026-07-04 09:15:00"
}
}
List Games
Get a list of all available games with their configurations, RTP, house edge, and betting limits.
GET
/api/game/list
Example Response
{
"success": true,
"data": {
"games": [
{
"game_code": "aviator",
"game_name": "Aviator Game",
"display_name": "Aviator Game",
"description": "Watch the rocket fly and cash out before it crashes!",
"min_bet": 0.10,
"max_bet": 1000.00,
"rtp": 97.00,
"house_edge": 3.00,
"status": "active",
"maintenance_mode": 0
}
]
}
}
Launch Game
Generate a game session URL for a player. This creates a JWT-secured game session that the player can access directly.
POST
/api/game/launch
| Parameter | Type | Required | Description |
| game_code | string | Required | Game code (e.g., 'aviator', 'treasure-dig') |
| player_id | string | Required | Player ID |
| return_url | string | Optional | URL to return after game session ends |
| token | string | Optional | JWT token (if already authenticated) |
Example Response
{
"success": true,
"data": {
"game_code": "aviator",
"game_name": "Aviator Game",
"launch_url": "https://mtxglobal.buzz/games/aviator/?token=eyJ0eXAi...",
"session_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"expires_at": "2026-07-05 11:39:00"
}
}
Create Game Round
Create a new game round. Some games require this before placing bets (e.g., Treasure Dig, Lava Bridge).
POST
/api/game/create
| Parameter | Type | Required | Description |
| game_code | string | Required | Game code |
| player_id | string | Optional | Player ID (required for some games) |
| bet_amount | decimal | Optional | Bet amount (required for some games) |
| grid_size | int | Optional | Grid size (Treasure Dig: 5,10,15,20,25) |
| mines_count | int | Optional | Number of mines (Treasure Dig: 1,3,5,7,10) |
Example: Create Treasure Dig Round
curl -X POST "https://mtxglobal.buzz/api/game/create" \\
-H "Content-Type: application/json" \\
-H "X-API-Key: your_api_key" \\
-d '{
"game_code": "treasure-dig",
"grid_size": 25,
"mines_count": 3
}'
Example Response
{
"success": true,
"data": {
"round_id": "rnd_1781063501_a3f7b2c9",
"game_code": "treasure-dig",
"grid_size": 25,
"mines_count": 3,
"status": "active",
"created_at": "2026-07-04 11:39:00"
}
}
Place Bet
Place a bet in an active game round. The action and parameters vary by game type.
POST
/api/game/bet
| Parameter | Type | Required | Description |
| game_code | string | Required | Game code |
| round_id | string | Required | Round ID |
| player_id | string | Required | Player ID |
| amount | decimal | Required | Bet amount |
| action | string | Optional | Action: 'place', 'reveal', 'step', etc. |
| cell_index | int | Optional | Cell index (Treasure Dig) |
| step | int | Optional | Step number (Lava Bridge) |
| auto_cashout | decimal | Optional | Auto cashout multiplier (Aviator) |
Example: Place Aviator Bet
curl -X POST "https://mtxglobal.buzz/api/game/bet" \\
-H "Content-Type: application/json" \\
-H "X-API-Key: your_api_key" \\
-d '{
"game_code": "aviator",
"round_id": "avi_1781063501_2d64a217",
"player_id": "player_001",
"amount": 10.00,
"auto_cashout": 2.50
}'
Example: Reveal Treasure Dig Cell
curl -X POST "https://mtxglobal.buzz/api/game/bet" \\
-H "Content-Type: application/json" \\
-H "X-API-Key: your_api_key" \\
-d '{
"game_code": "treasure-dig",
"round_id": "rnd_1781063501_a3f7b2c9",
"player_id": "player_001",
"action": "reveal",
"cell_index": 5
}'
Cash Out
Cash out your bet at the current multiplier or state. Available for games that support mid-round cashout.
POST
/api/game/cashout
| Parameter | Type | Required | Description |
| game_code | string | Required | Game code |
| round_id | string | Required | Round ID |
| player_id | string | Required | Player ID |
| cashout_multiplier | decimal | Optional | Manual cashout multiplier |
Example Response
{
"success": true,
"data": {
"round_id": "avi_1781063501_2d64a217",
"cashout_multiplier": 2.37,
"bet_amount": 10.00,
"payout": 23.70,
"profit": 13.70,
"new_balance": 1013.70
}
}
Game Result
Retrieve the result of a completed game round.
GET
/api/game/result?game_code=aviator&round_id=avi_1781063501_2d64a217
Game Config
Get or update game configuration settings for your client. This allows customizing min/max bets, RTP, and game-specific settings.
GET
/api/game/config?game_code=aviator
POST
/api/game/config
# Continue writing the games section
part2 = '''
Aviator (Crash Game)
Aviator Game
Crash RTP 97% House Edge 3%
Watch the rocket fly and cash out before it crashes! The multiplier increases continuously until a random crash point determined by a provably fair algorithm.
Game Mechanics
- Place a bet before or during the betting phase
- The rocket takes off with a 1.00x multiplier
- Multiplier increases until it crashes at a random point
- Cash out before the crash to win bet x multiplier
- If you do not cash out before crash, you lose your bet
API Endpoints
POST/api/games/aviator?action=place_bet&token=SESSION_TOKEN
POST/api/games/aviator?action=cashout&token=SESSION_TOKEN
GET/api/games/aviator?action=history&token=SESSION_TOKEN
Config
| Setting | Default | Range |
| crash_interval_min | 1.00 | 1.00 - 100.00 |
| crash_interval_max | 100.00 | 1.00 - 100.00 |
| animation_speed | 1 | 0.5 - 3.0 |
Treasure Dig (Minesweeper)
Treasure Dig
Minesweeper RTP 96.5% House Edge 3.5%
Dig for treasure but avoid the bombs! Reveal cells on a grid. Each safe cell increases your multiplier. Hit a bomb and lose your bet.
Game Mechanics
- Create a round with grid_size and mines_count
- Place your bet
- Reveal cells one by one
- Each safe reveal increases the multiplier
- Hit a bomb and lose everything
- Cash out anytime to secure your winnings
Config
| Setting | Options |
| grid_sizes | 5, 10, 15, 20, 25 |
| mine_options | 1, 3, 5, 7, 10 |
Lava Bridge (Risk Steps)
Lava Bridge
Risk Steps RTP 96% House Edge 4%
Cross the bridge without falling into lava! Each step forward increases the multiplier, but the risk of falling increases with each step.
Game Mechanics
- Start at step 0 with a 1.00x multiplier
- Take a step forward to increase multiplier
- Each step has increasing risk of falling
- Fall into lava and lose your bet
- Cash out anytime to secure winnings
Config
| Setting | Default |
| steps | 10 |
| risk_increase | 0.1 per step |
Elevator Rush
Elevator Rush
Progressive RTP 96.5% House Edge 3.5%
Ride the elevator to higher floors for bigger multipliers! Each floor you reach increases your potential payout.
Game Mechanics
- Start at floor 1 with 1.00x multiplier
- Go up floors to increase multiplier
- Each floor adds 0.15x to multiplier
- Maximum 20 floors
- Cash out anytime or risk the elevator breaking
Config
| Setting | Default |
| max_floors | 20 |
| floor_multiplier | 0.15 per floor |
Gold Mine Cart
Gold Mine Cart
Mining RTP 96% House Edge 4%
Ride the mine cart deeper for more gold! Progress deeper into the mine for exponentially increasing multipliers.
Game Mechanics
- Start at progress 0 with 1.00x multiplier
- Progress deeper to increase multiplier
- Maximum 15 progress levels
- Risk curve is exponential - higher risk at deeper levels
- Cash out anytime or risk a cave-in
Config
| Setting | Default |
| max_progress | 15 |
| risk_curve | exponential |
Space Doors
Space Doors
Probability RTP 98.5% House Edge 4.5%
Choose the right door to survive! In each round, pick one of the doors. Some lead to safety, others to danger.
Game Mechanics
- Multiple rounds (default 5)
- Each round has 3 doors
- Pick the safe door to advance
- Pick the wrong door and lose
- Multiplier increases with each survived round
Config
| Setting | Default |
| doors | 3 |
| rounds | 5 |
Crypto Pump
Crypto Pump
Trading Sim RTP 97% House Edge 3%
Buy low, sell high in the crypto market! Watch the price chart and decide when to sell before the crash.
Game Mechanics
- Place bet at buy price
- Watch the price chart pump
- Sell before the crash for profit
- 60-second time limit per round
- Medium volatility by default
Config
| Setting | Default |
| volatility | medium |
| time_limit | 60 seconds |
Treasure Ship
Treasure Ship
Navigation RTP 96% House Edge 4%
Navigate your ship through storms to find treasure! Choose routes wisely to avoid sinking.
Game Mechanics
- 8 possible routes to navigate
- Each route has storm probability
- Navigate safely to increase multiplier
- Hit a storm and sink (lose bet)
- Cash out at any port or risk the storm
Config
| Setting | Default |
| routes | 8 |
| storm_probability | 0.3 (30%) |
Snake Tunnel
Snake Tunnel
Path Finding RTP 96% House Edge 4%
Navigate through the tunnel avoiding snakes! Crawl through segments, each with a chance of encountering a snake.
Game Mechanics
- 12 segments in the tunnel
- Each segment has snake probability
- Survive segments to increase multiplier
- Get bitten by snake and lose
- Exit tunnel anytime to cash out
Config
| Setting | Default |
| segments | 12 |
| snake_probability | 0.25 (25%) |
Meteor Run
Meteor Run
Survival RTP 96.5% House Edge 3.5%
Run from the meteors and survive! The longer you run, the higher your multiplier, but meteor frequency increases.
Game Mechanics
- Maximum distance: 100 units
- Meteor frequency increases over time
- Survive longer for higher multipliers
- Get hit by meteor and lose
- Stop running anytime to cash out
Config
| Setting | Default |
| max_distance | 100 |
| meteor_frequency | increasing |
Wallet Balance
Get the current wallet balance for your client account, including frozen balance and total deposited/withdrawn amounts.
GET
/api/wallet/balance
Example Response
{
"success": true,
"data": {
"balance": 5000.00,
"frozen_balance": 0.00,
"total_deposited": 5000.00,
"total_withdrawn": 0.00,
"currency": "USDT"
}
}
Transaction History
Retrieve transaction history for your client account, including deposits, withdrawals, game credits, and debits.
GET
/api/wallet/transactions?limit=50&offset=0
Query Parameters
| Parameter | Type | Required | Description |
| limit | int | Optional | Number of records (default: 50, max: 100) |
| offset | int | Optional | Offset for pagination (default: 0) |
| type | string | Optional | Filter by type: deposit, withdrawal, game_credit, game_debit |
| status | string | Optional | Filter by status: pending, completed, failed |
Webhooks
Configure a webhook URL in your client dashboard to receive real-time event notifications. Webhooks are sent as POST requests with a JSON payload.
Important
Your webhook endpoint must respond with HTTP 200 within 30 seconds. Failed webhooks will be retried up to 3 times automatically by the worker script.
Webhook Configuration
Set your webhook URL in the client dashboard or via the API. The platform will send POST requests to this URL whenever relevant events occur.
Event Types
| Event | Description | Payload |
player.created | Triggered when a new player is created | player_id, username, balance |
player.credited | Triggered when player balance is credited | player_id, amount, new_balance |
player.debited | Triggered when player balance is debited | player_id, amount, new_balance |
game.bet_placed | Triggered when a bet is placed | game, round_id, player_id, amount |
game.cashout | Triggered when player cashes out | game, round_id, player_id, multiplier, profit |
game.round_ended | Triggered when a round ends | game, round_id, crash_multiplier, total_bets |
deposit.confirmed | Triggered when a deposit is confirmed | amount, tx_hash, network |
withdrawal.processed | Triggered when withdrawal is processed | amount, tx_hash, status |
subscription.renewed | Triggered on subscription renewal | plan, amount, end_date |
subscription.expired | Triggered when subscription expires | plan, expired_at |
Webhook Payload Format
{
"event": "game.cashout",
"timestamp": 1704067200,
"data": {
"game": "aviator",
"round_id": "avi_1234567890",
"player_id": "player_123",
"bet_amount": 10.00,
"cashout_multiplier": 2.50,
"profit": 15.00,
"new_balance": 1015.00
}
}
Webhook Retry Logic
The worker script runs every 5 minutes (configurable via cron) and retries failed webhooks up to 3 times. Each retry is logged in the webhook_logs table.
Test Webhook
Send a test webhook to verify your endpoint is configured correctly.
POST
/api/webhook/test
Provably Fair Algorithm
All games on the MTX Global platform use a provably fair algorithm based on SHA-512 hashing. This ensures that game outcomes cannot be manipulated by the platform or the client.
How It Works
- Server Seed - Generated by the server before each round, hashed and displayed to the player
- Client Seed - Provided by the client (or randomly generated)
- Nonce - Incremental number for each bet
- Result Calculation - HMAC-SHA512(server_seed, client_seed + nonce)
Crash Point Formula (Aviator)
function calculateCrashMultiplier($seed, $houseEdge = 3.00) {
$hash = hash('sha512', $seed);
$checkValue = hexdec(substr($hash, 0, 8));
$instantThreshold = floor(100 / $houseEdge);
if ($checkValue % $instantThreshold === 0) {
return 1.00;
}
$hexSlice = substr($hash, 0, 13);
$h = hexdec($hexSlice) / pow(2, 52);
$rtp = 100 - $houseEdge;
$crashPoint = ($rtp / (1 - $h)) / 100;
return floor($crashPoint * 100) / 100;
}
Verification
Players can verify game outcomes by combining the server seed (revealed after the round), client seed, and nonce to reproduce the hash and confirm the result.
Error Codes Reference
| Code | HTTP Status | Description |
| INVALID_API_KEY | 401 | API key is invalid or revoked |
| CLIENT_SUSPENDED | 403 | Client account is suspended |
| SUBSCRIPTION_EXPIRED | 403 | Subscription has expired |
| MISSING_CREDENTIALS | 400 | API key and secret key are required |
| INVALID_JSON | 400 | Invalid JSON payload in request body |
| MISSING_PARAMS | 400 | Required parameters are missing |
| INVALID_BET_AMOUNT | 400 | Bet amount is outside allowed range |
| INSUFFICIENT_BALANCE | 400 | Player has insufficient balance |
| PLAYER_NOT_FOUND | 404 | Player does not exist |
| GAME_NOT_FOUND | 404 | Game code is invalid |
| ROUND_CLOSED | 400 | Round is no longer accepting bets |
| ALREADY_BET | 409 | Player already placed bet in this round |
| TRANSACTION_FAILED | 500 | Internal transaction error |
| METHOD_NOT_ALLOWED | 405 | HTTP method not allowed for this endpoint |
| NOT_FOUND | 404 | Endpoint not found |
| RATE_LIMIT_EXCEEDED | 429 | Too many requests, rate limit exceeded |
Installation Guide
System Requirements
- PHP 8.2+ with pdo_mysql, openssl, mbstring, json, curl extensions
- MySQL 8.0+ or MariaDB 10.11+
- Apache/Nginx with mod_rewrite
- SSL Certificate (recommended)
- 2GB+ RAM, 20GB+ Storage
Quick Setup
define('DB_HOST', 'localhost');
define('DB_NAME', 'your_database');
define('DB_USER', 'your_user');
define('DB_PASS', 'your_password');
define('JWT_SECRET', 'your_strong_random_secret_key_here');
define('USDT_TRC20_ADDRESS', 'YOUR_TRC20_WALLET_ADDRESS');
define('USDT_BEP20_ADDRESS', 'YOUR_BEP20_WALLET_ADDRESS');
Cron Job Setup
Set up a cron job to run the worker script every 5 minutes:
*/5 * * * * /usr/bin/php /home/username/public_html/scripts/worker.php >> /home/username/logs/worker-cron.log 2>&1
Default Login Credentials
| Panel | URL | Username | Password |
| Admin Panel | /admin/login.php | superadmin | password |
| Client Panel | /client/login.php | demo@client.com | password |
Security Warning
Change default passwords immediately after installation. Use strong JWT secrets and API keys. Enable HTTPS for all traffic.
Support
Need help integrating the MTX Global Game API Platform? Our support team is available to assist you.
Email Support
support@gameapi.com
Telegram
@gameapi_support
API Version
Current API Version: v1 | Base URL: https://mtxglobal.buzz/api/
Documentation last updated: July 2026