Verse API Solutions
Unified API gateway for integrating multiple game providers with seamless wallet operations
Introduction
Verse API Solutions provides a unified API gateway for integrating multiple game providers into your gaming platform. The API handles authentication, game launching, and seamless wallet operations.
https://prod.vas.bijlihyg.icu/Version: 2.0
Last Updated: 2025-11-03
Key Features
- Unified API: Single endpoint for multiple game providers
- Seamless Wallet: Automatic balance management for games
- Multi-Currency Support: Supports INR, USD, BDT, BRL, IDR
- Multi-Vendor Support: Access to 90+ game vendors
- Automatic Balance Sync: Handles balance synchronization between your platform and game providers
Authentication
All API requests require authentication using your OPT Code and Secret Key provided by Verse API Solutions.
Required Parameters
Every API request must include:
| Parameter | Type | Required | Description |
|---|---|---|---|
opt_code |
string | Yes | Your operator code (provided by Verse API Solutions) |
secret_key |
string | Yes | Your secret key (provided by Verse API Solutions) |
Example Authentication
{
"opt_code": "demouser",
"secret_key": "demouser"
}
Launch Game
Launch a game for a player. Supports multiple game providers.
Endpoint
POST https://prod.vas.bijlihyg.icu/
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
opt_code |
string | Yes | Your operator code |
secret_key |
string | Yes | Your secret key |
action |
string | Yes | Set to "launch_game" |
user_id |
string | Yes | Your internal user ID |
game_code |
string | Yes | Game code (e.g., "aviator", "crash", "mines") |
vendor_code |
string | No | Vendor code (e.g., "SPRIBE", "PRAGMATIC", "PIXMOVE") |
currency |
string | No | Currency code (e.g., "INR", "USD", "BDT"). Defaults to agent's default currency |
returnUrl |
string | No | URL to return player after game session ends |
Request Example
{
"opt_code": "demouser",
"secret_key": "demouser",
"action": "launch_game",
"user_id": "test_user_123",
"game_code": "aviator",
"vendor_code": "SPRIBE",
"currency": "INR",
"returnUrl": "https://yourwebsite.com/game-return"
}
Response Format
Success Response:
{
"code": 0,
"message": "",
"data": {
"url": "https://game-provider.com/launch?token=xyz123",
"content": ""
},
"timestamp": 1694617425
}
Get Player Balance
Get the current balance of a player in the Verse API system.
Endpoint
POST https://prod.vas.bijlihyg.icu/
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
opt_code |
string | Yes | Your operator code |
secret_key |
string | Yes | Your secret key |
action |
string | Yes | Set to "get_balance" |
user_id |
string | Yes | Your internal user ID |
Request Example
{
"opt_code": "demouser",
"secret_key": "demouser",
"action": "get_balance",
"user_id": "test_user_123"
}
Response Example
{
"code": 0,
"message": "",
"data": {
"user_id": "test_user_123",
"balance": 10000.5000,
"currency": "INR"
},
"timestamp": 1694617425
}
Check Agent
Verify your agent credentials and get account information.
Endpoint
POST https://prod.vas.bijlihyg.icu/
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
opt_code |
string | Yes | Your operator code |
secret_key |
string | Yes | Your secret key |
action |
string | Yes | Set to "check_agent" |
Request Example
{
"opt_code": "demouser",
"secret_key": "demouser",
"action": "check_agent"
}
Response Example
{
"code": 0,
"message": "",
"data": {
"agent_code": "VAS81FDED90",
"opt_code": "demouser",
"game_name": "Your Game Name",
"currency": "INR",
"wallet_balance": 50000.00,
"status": "active"
},
"timestamp": 1694617425
}
Callback Implementation
Your platform MUST implement callback endpoints to handle balance operations from game providers. These callbacks are called by Verse API Solutions when game providers need to check balances, deduct bets, or credit winnings.
Example:
https://yourwebsite.com/callback.php
Balance Callback
Called by game providers to check a player's current balance.
Endpoint
POST {{your_callback_url}}/v1/api/seamless/balance
Request Format
{
"batch_requests": [
{
"member_account": "demouser_test_user_123",
"product_code": 1138
}
],
"operator_code": "demouser",
"currency": "INR",
"sign": "md5_hash_here",
"request_time": "1694617425"
}
Response Format
{
"code": 0,
"message": "",
"data": [
{
"code": 0,
"message": "Success",
"balance": 10000.5000
}
]
}
Withdraw Callback
Called when a player places a bet (deducts balance).
Request Format
{
"batch_requests": [
{
"member_account": "demouser_test_user_123",
"product_code": 1138,
"game_type": "OTHER",
"transactions": [
{
"id": "23a1c8f1-0738-4a39-b1ee-f5d6e59fd09d",
"amount": "-1500",
"bet_amount": "1500",
"valid_bet_amount": "1500",
"prize_amount": "0",
"tip_amount": "0",
"action": "BET",
"wager_code": "oEjiUVdBxrumwf47TGgVKd",
"wager_status": "BET",
"payload": {
"action": "bet",
"action_id": 5094787,
"amount": "1500",
"currency": "IDR",
"game": "aviator",
"platform": "desktop",
"provider": "spribe_aviator",
"provider_tx_id": "77099924",
"session_token": "2eeb3a714a03489a9242f181ce53657a",
"user_id": "d63bbe58657d99fd4ca6"
},
"settled_at": 0,
"game_code": "aviator",
"round_id": "77099924",
"channel_code": "efnf",
"wager_type": "NORMAL"
}
]
}
],
"operator_code": "demouser",
"game_type": "",
"request_time": "1762301631",
"sign": "596c40a6727257532933049dc2a66c81",
"currency": "IDR"
}
Response Format
{
"data": [
{
"member_account": "demouser_test_user_123",
"product_code": 1138,
"before_balance": 10000.00,
"balance": 8500.00,
"code": 0,
"message": ""
}
]
}
Deposit Callback
Called when a player wins (credits balance).
Request Format
{
"batch_requests": [
{
"member_account": "demouser_test_user_123",
"product_code": 1138,
"game_type": "OTHER",
"transactions": [
{
"id": "23a1c8f1-0738-4a39-b1ee-f5d6e59fd09d",
"amount": "3000",
"bet_amount": "1500",
"valid_bet_amount": "1500",
"prize_amount": "3000",
"tip_amount": "0",
"action": "SETTLED",
"wager_code": "oEjiUVdBxrumwf47TGgVKd",
"wager_status": "SETTLED",
"payload": {
"action": "settled",
"action_id": 5094787,
"amount": "3000",
"currency": "IDR",
"game": "aviator",
"platform": "desktop",
"provider": "spribe_aviator",
"provider_tx_id": "77099924",
"session_token": "2eeb3a714a03489a9242f181ce53657a",
"user_id": "d63bbe58657d99fd4ca6"
},
"settled_at": 1762301631,
"game_code": "aviator",
"round_id": "77099924",
"channel_code": "efnf",
"wager_type": "NORMAL"
}
]
}
],
"operator_code": "demouser",
"game_type": "",
"request_time": "1762301631",
"sign": "596c40a6727257532933049dc2a66c81",
"currency": "IDR"
}
Response Format
{
"data": [
{
"member_account": "demouser_test_user_123",
"product_code": 1138,
"before_balance": 8500.00,
"balance": 11500.00,
"code": 0,
"message": ""
}
]
}
Error Codes
Complete list of error codes and their descriptions.
| Code | Message | Description |
|---|---|---|
| 0 | Success | Operation completed successfully |
| 999 | Internal Server Error | Server-side error occurred |
| 1001 | Missing required parameters | Required parameters are missing |
| 1002 | Invalid agent credentials | Invalid opt_code or secret_key, or IP not whitelisted |
| 1003 | Agent account is inactive | Agent account is disabled |
| 1004 | Missing required parameter: user_id | user_id parameter is required |
| 1007 | Failed to launch game | Game launch failed (check debug info) |
| 1008 | Insufficient agent wallet balance | Agent wallet balance is below minimum (100) |
| 1009 | Currency not enabled | Requested currency is not enabled for this agent |
| 1010 | Vendor not enabled | Requested vendor is not enabled for this agent |
| 1000 | API member does not exist | Player account not found |
| 1001 | API member balance is insufficient | Player balance is too low for withdrawal |
| 1002 | Invalid action | Transaction action is not allowed |
| 1003 | Unsupported currency / Duplicate API transactions | Invalid currency or duplicate transaction detected |
| 1004 | API signature is invalid | Request signature verification failed |
| 1006 | API bet does not exist | Wager code not found (for CANCEL operations) |
PHP Integration Examples
Launch Game - PHP Example
<?php
function launchGame($userId, $gameCode, $vendorCode = 'SPRIBE', $currency = 'INR') {
$apiUrl = 'https://prod.vas.bijlihyg.icu/';
$requestData = [
'opt_code' => 'demouser',
'secret_key' => 'demouser',
'action' => 'launch_game',
'user_id' => $userId,
'game_code' => $gameCode,
'vendor_code' => $vendorCode,
'currency' => $currency,
'returnUrl' => 'https://yourwebsite.com/game-return'
];
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($requestData));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Accept: application/json'
]);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode == 200) {
$result = json_decode($response, true);
if ($result && $result['code'] == 0) {
return $result['data']['url'];
}
}
return null;
}
// Usage
$gameUrl = launchGame('test_user_123', 'aviator', 'SPRIBE', 'INR');
if ($gameUrl) {
header('Location: ' . $gameUrl);
exit;
}
?>
Balance Callback - PHP Example
<?php
function handleBalanceCallback($requestData) {
$batchRequests = $requestData['batch_requests'] ?? [];
$result = [
'code' => 0,
'message' => '',
'data' => []
];
foreach ($batchRequests as $request) {
$memberAccount = $request['member_account'] ?? '';
// Extract user_id from member_account format
$userId = $memberAccount;
// Get balance from database
$balance = getUserBalance($userId); // Your function to get balance
$result['data'][] = [
'code' => 0,
'message' => 'Success',
'balance' => round($balance, 4)
];
}
header('Content-Type: application/json');
echo json_encode($result);
exit;
}
?>
Node.js Integration Examples
Launch Game - Node.js Example
const axios = require('axios');
async function launchGame(userId, gameCode, vendorCode = 'SPRIBE', currency = 'INR') {
const apiUrl = 'https://prod.vas.bijlihyg.icu/';
const requestData = {
opt_code: 'demouser',
secret_key: 'demouser',
action: 'launch_game',
user_id: userId,
game_code: gameCode,
vendor_code: vendorCode,
currency: currency,
returnUrl: 'https://yourwebsite.com/game-return'
};
try {
const response = await axios.post(apiUrl, requestData, {
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
timeout: 30000
});
if (response.data && response.data.code === 0) {
return response.data.data.url;
}
throw new Error(response.data.message || 'Launch failed');
} catch (error) {
console.error('Launch game error:', error.message);
return null;
}
}
// Usage
launchGame('test_user_123', 'aviator', 'SPRIBE', 'INR')
.then(gameUrl => {
if (gameUrl) {
console.log('Game URL:', gameUrl);
// Redirect user to gameUrl
}
});
Live Game Launcher
Test our API with the live game launcher below. Use the demo user account to test game launches.