Skip to content

Game Launch ​

Get game launch URL for players to enter real-money games.

Environment URLs ​

EnvironmentBase URL
Productionhttps://hub-panel-api.v7stech.com
Staginghttps://hub-panel-api-dev.v7stech.com

Endpoint ​

PropertyValue
PathPOST /papi/v1/game/launch
AuthAgent Token (Bearer)
Content-Typeapplication/x-www-form-urlencoded

Request Parameters ​

ParameterTypeRequiredDescription
member_idstringYesPlayer unique identifier (Agent-side ID). Only English letters and digits are allowed; uppercase letters are automatically converted to lowercase by Hub. Spaces, underscores, hyphens, and other symbols are rejected.
game_idstringYesGame ID (from Game List API)
currencystringYesCurrency code (e.g. MYR, USD). Automatically converted to uppercase
platformstringNoPlatform type: WEB / MOBILE / DESKTOP, default WEB. Automatically converted to uppercase
languagestringNoLanguage code, default en-US
return_urlstringNoURL to redirect after game exit

Automatic Setup

When a player launches a game for the first time:

  1. The player is automatically registered with the game provider (no separate call needed)
  2. A wallet with balance=0 is automatically created for the specified currency (if not already exists)

Switching Games in the Same Currency ​

If the player is already in another game for the same currency, the new launch is not rejected. Hub first aggregates and clears every Provider wallet, including late payouts, and sends one switch_game Offline callback. Whether the Agent callback succeeds or fails, it does not block the new launch. Hub then best-effort closes the old session and returns the new game URL with a new session_id. Use only this new session_id for later balance sync and callbacks.

Request Example ​

bash
curl -X POST https://api.example.com/papi/v1/game/launch \
  -H "Authorization: Bearer {agent_token}" \
  -d "member_id=player001&game_id=xxxx-guid&currency=MYR&platform=WEB&language=en-US"

Response Fields ​

FieldTypeDescription
game_urlstringGame launch URL (redirect player to this URL to enter game)
session_idstringUnique VCT session ID. Store it and use it to reconcile balance, wager pushes, and offline reclaim.

Response Example ​

json
{
  "status": true,
  "code": 0,
  "data": {
    "game_url": "https://game.provider.com/play?token=xxx&lang=en-US",
    "session_id": "vct-session-uuid-001"
  },
  "msg": "success"
}

Error Codes ​

CodeMessageDescription
1001err.param.invalidRequired parameters missing (member_id, game_id, currency)
1002err.signature.invalidAgent Token verification failed
2006err.player.member_id_invalidInvalid member_id format: English letters and digits only; spaces and symbols are not allowed
2001err.player.not_foundPlayer not found (must register first)
4001err.game.not_foundGame not found or offline
4005err.game.launch_failedGame launch failed (provider registration or internal error)
4006err.game.access_deniedGame-launch access validation failed. Use msg to identify whether the game does not support the currency, the agent currency is disabled, the brand does not support the currency, a commission rate is missing, or the game is unauthorized. See Error Codes.
5002err.provider.call_failedGame provider API call failed

Currency Launch Prerequisites ​

currency must be an actual currency returned for that game by Game List. For provider games marked ALL, Hub resolves the marker to its final launchable currency set during Game List; ALL itself cannot be used to launch.

Launch also verifies that the currency is globally enabled in Currency Management, supported by the game and Brand, allowed for the Agent, and covered by an applicable commission rate. A failure at any stage returns 4006; correct the configuration indicated by msg rather than retrying.

Launch Failure and Balance Compensation ​

Game launch is successful only when VCT returns code=0, a non-empty game_url, and a confirmed session_id. Receiving a successful /balance callback alone does not mean that the game launch succeeded.

If /balance succeeds but the provider launch fails, VCT sends action: "launch_failed" to /api/v1/callback/offline with the original session_id and reclaimed_amount. The Agent must release only the temporary session and lock; it must not process this as normal offline settlement or credit the player more than once.

AI Implementation Prompt (Copy Ready) ​

text
Implement the VCT real-money Game Launch flow in the current Agent project.

Endpoint: POST {VCT_BASE_URL}/papi/v1/game/launch
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {agent_token}, generated server-side.
Required fields: member_id, game_id, currency. Optional: platform, language, return_url.

Requirements:
1. Allow only letters and digits in member_id. Uppercase currency and platform. game_id must come from the VCT Game List id.
2. Prevent concurrent launches for the same Agent, player, and currency.
3. Mark launch successful only when HTTP succeeds, code=0, data.game_url is non-empty, and data.session_id is non-empty.
4. Persist the exact VCT session_id with player, currency, and game_id; reuse it for reclaim, bet-push, and offline.
5. A successful /balance callback is launch preparation only; do not record enter_game until requirement 3 succeeds.
6. For offline action=launch_failed, release only the matching temporary session/lock and never credit the wallet as a normal exit.
7. Surface code=4006 msg for currency, brand, commission, or game-access diagnosis. Do not retry configuration errors.
8. Retry transient network/5xx failures carefully and use an idempotency/request record to avoid duplicate launches after uncertain results.
9. Never expose credentials, the full Token, or sensitive query tokens from game_url in logs.
10. Test validation, success, missing URL/session ID, concurrency, 4006, timeout, and launch_failed compensation.

Reuse existing auth, HTTP client, session, and locking components. Deliver service/controller, redirect flow, and tests.

VCT Gaming Integration Platform