### Request Body Example for Operator API Source: https://docs.hub88.io/developer-docs/operator-api-reference/getting-started This is an example JSON payload for a request to the Operator API. It includes necessary fields like user, country, currency, operator_id, token, platform, game_code, lang, lobby_url, and IP address. Ensure this body is used exactly as provided for signature generation. ```json { "user": "3nYTOSjdlF6UTz9Ir", "country": "XX", "currency": "EUR", "operator_id": 1, "token": "cd6bd8560f3bb8f84325152101adeb45", "platform": "GPL_DESKTOP", "game_code": "clt_dragonrising", "lang": "en", "lobby_url": "https://examplecasino.io", "ip": "::ffff:10.0.0.39" } ``` -------------------------------- ### Get a list of campaigns Source: https://docs.hub88.io/developer-docs/operator-api-reference/freebets-api Retrieves a list of all available campaigns. ```APIDOC ## GET /campaigns ### Description Retrieves a list of all available campaigns. ### Method GET ### Endpoint /campaigns ### Parameters #### Query Parameters - **operator_id** (integer) - Required - Unique identifier for the Operator in Hub88 system. ### Response #### Success Response (200) - **campaigns** (array) - A list of campaign objects. - **campaign_uuid** (string) - The unique campaign ID in Hub88 side, displayed in standard 16-byte UUID format. #### Response Example ```json { "campaigns": [ { "campaign_uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ] } ``` ``` -------------------------------- ### Create Freebet Reward - JSON Request Example Source: https://docs.hub88.io/developer-docs/operator-api-reference/freebets-api This example demonstrates how to structure a JSON request to create a freebet reward using the POST /operator/generic/v2/freebet/rewards/create endpoint. It includes parameters for user identification, operator details, reward type (via prepaid_uuid or campaign_uuid), and optional bet value, count, and timeframes. Ensure to include the 'X-Hub88-Signature' header for authentication. ```json { "user": "example_user", "operator_id": "your_operator_id", "prepaid_uuid": "your_prepaid_uuid", "bet_value": 10.00, "bet_count": 5, "start_time": "2023-10-27T10:00:00Z", "end_time": "2023-10-27T12:00:00Z", "operator_reference": "reward_ref_123" } ``` -------------------------------- ### Get Personalized User Lobby Recommendations Source: https://docs.hub88.io/developer-docs/operator-api-reference/recommendations-api Retrieve a list of recommended games tailored to the user's preferences and context. This endpoint is crucial for enhancing user engagement by presenting relevant game options. ```APIDOC ## GET /lobby/recommendations ### Description Retrieves a list of recommended games for a user. The recommendations are personalized based on factors such as game popularity, user history, and potentially other contextual data. ### Method GET ### Endpoint /lobby/recommendations ### Parameters #### Query Parameters - **operator_id** (integer) - Required - Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. - **platform** (string) - Optional - The platform layout, either mobile or desktop, the User has. Can be ignored if mode is chosen based on User's browser attributes. - **country** (string) - Required - The ISO 3166-1 country code, applicable to the User in the current session. ### Request Example ``` GET /lobby/recommendations?operator_id=123&country=XX ``` ### Response #### Success Response (200) - **recommendations** (array) - List of recommended games. - **recommendation_id** (string) - Unique identifier for a recommendation. - **game_info** (object) - Detailed information about the recommended game. - **name** (string) - The name of the game. - **description** (string) - A brief description of the game. - **provider_name** (string) - The name of the game provider. - **logo_url** (string) - URL to the game's logo. - **image_url** (string) - URL to the game's image. - **jurisdiction** (object) - Information about the game's jurisdiction. - **countries** (array) - List of countries where the game is available. - **blocked_countries** (array) - List of countries where the game is blocked. - **features** (object) - Special features of the game. - **rtp** (string) - Return to Player percentage. - **volatility** (string) - The volatility of the game. - **paylines** (integer) - Maximum number of available paylines. - **hit_ratio** (string) - The Hit Ratio indicating winning/losing bets ratio. - **certifications** (array) - List of gaming authorities that have certified the Game. - **languages** (array) - List of languages supported by the Game. - **theme** (array) - List of themes assigned to the Game. - **technology** (array) - Technologies used within the Game. - **score** (number) - Recommendation score. #### Response Example ```json { "recommendations": [ { "recommendation_id": "rec_12345", "game_info": { "name": "Slotastic", "description": "A thrilling slot game with exciting bonus features.", "provider_name": "GameProviderX", "logo_url": "https://example.com/logos/slotastic.png", "image_url": "https://example.com/images/slotastic.jpg", "jurisdiction": { "countries": ["US", "CA"], "blocked_countries": ["GB", "DE"] }, "features": { "rtp": "96.5%", "volatility": "High", "paylines": 20, "hit_ratio": "0.35", "certifications": ["MGA"], "languages": ["en"], "theme": ["Adventure", "Fantasy"], "technology": ["HTML5", "WebGL"], "score": 0.9 } } } ] } ``` #### Error Response (400) - **RecommendationsError** (object) - Error response. - **error** (string) - Message with the reason why the request failed. #### Error Response Example ```json { "RecommendationsError": { "error": "Invalid operator_id provided." } } ``` ``` -------------------------------- ### Signature Example for Operator API Request Source: https://docs.hub88.io/developer-docs/operator-api-reference/getting-started This is an example of a Base64 encoded RSA-SHA256 signature for the Operator API request body. This signature should be included in the 'X-Hub88-Signature' header. Ensure there are no whitespaces or formatting differences in the generated signature. ```text DYKK0KsSMayoyHcpFx32R57mZ8ey2r8U4RscT9LiWEFkd40V/f2n9JafsC+yuB8OSHz+wdCvyxvqacNiL8r3ZGEBdTL4lrcjdM5PWHQu8auYNp2mGE0tbX6/KGyk8nyQ3+h1HogIHj5hnMNYx0r+AhFT2tD/IT2b3Pq6oDPNL8rK0CbDCm8w7+gal1i0T1pDo61e2CTDTHpfm4ELEKcff2iiIRvgQ52nUCkuxQjCN/BGyEC1il0AVwlcb8CKU6Utg48UqvPLqu38qahI5X53zBMpLFIOtOYcFoepWmHvBxh0GDM4NIfQQ3Cm5sFyN3AsqzM7rqA0N9VZP0QPK8fA0g== ``` -------------------------------- ### Demo Gameplay Source: https://docs.hub88.io/developer-docs/operator-api-reference/operator-api-overview Steps for initiating and managing demo gameplay mode. ```APIDOC ## Demo Gameplay ### Process 1. **Obtain Game URL**: The Operator makes a Game API call to `/game/url`. For DEMO mode, the Operator must pass `"currency":"XXX"`. Parameters `token` and `user` may be omitted. 2. **Direct Player**: Once the game URL is returned, the Operator uses it to direct the player to the game (e.g., by launching it in an iframe or redirecting the player). 3. **Balance Handling**: In DEMO mode, no calls are made to the Operator's API for balance updates, as providers handle the balance internally. If the player wishes to switch to REAL mode, the Operator should proceed with the relevant steps. ``` -------------------------------- ### Gameplay Overview Source: https://docs.hub88.io/developer-docs/operator-api-reference/operator-api-overview High-level steps for the gameplay process once prerequisites are met. ```APIDOC ## Gameplay Overview ### Process Once prerequisites are met, the gameplay process involves the following steps: 1. Obtain a game URL from Hub88. 2. Direct the customer to the URL provided by Hub88. 3. Respond to in-game events sent by Hub88 and update the customer's balance (for SEAMLESS WALLET ONLY). This high-level gameplay flow corresponds to the core communication between Supplier and Operator APIs. ``` -------------------------------- ### Demo Gameplay Flow Source: https://docs.hub88.io/developer-docs/supplier-api-reference/supplier-api-overview Details on the interaction flow for initiating a game in DEMO mode, including obtaining the game URL. ```APIDOC ## Demo Gameplay Flow ### Description This outlines the high-level process for initiating a game in DEMO mode. Hub88 first obtains a game URL from the supplier and then redirects the operator's player to this URL. No Wallet API calls are expected in DEMO mode. ### Steps 1. **Obtain Game URL:** Hub88 calls the Supplier's `/game/url` endpoint. This call is identifiable as DEMO mode by the parameters `"currency":"XXX"` and the omission of `token` and `user` parameters. 2. **Redirect User:** Upon receiving the game URL, the Operator directs the user to this URL (e.g., via iframe or redirect). ### Endpoint `/game/url` (Supplier API) ### Parameters #### Request Body (for `/game/url` in DEMO mode) - **operator_id** (integer) - Required - The ID of the operator. - **game_code** (string) - Required - The code of the game to launch. - **currency** (string) - Required - Set to `"XXX"` to indicate DEMO mode. - **lang** (string) - Optional - The language for the game. - **platform** (string) - Optional - The platform the game is being launched on. ### Request Example (for `/game/url` in DEMO mode) ```json { "operator_id": 1, "game_code": "ctl_dragonrising", "currency": "XXX", "lang": "en", "platform": "GPL_DESKTOP" } ``` ### Response #### Success Response (200) - **game_url** (string) - The URL to launch the game in DEMO mode. #### Response Example ```json { "game_url": "https://games.example.com/dragonrising?playerId=..." } ``` ``` -------------------------------- ### Get Campaign by UUID - Python Example Source: https://docs.hub88.io/developer-docs/operator-api-reference/freebets-api This Python snippet demonstrates how to retrieve campaign details using a campaign UUID. It assumes the availability of an API client configured for Hub88. ```python import requests def get_campaign_by_uuid(api_token, campaign_uuid): headers = { 'Authorization': f'Bearer {api_token}' } response = requests.get(f'https://api.hub88.io/v1/campaigns/{campaign_uuid}', headers=headers) if response.status_code == 200: return response.json() else: print(f"Error: {response.status_code} - {response.text}") return None # Example usage: # api_token = 'YOUR_API_TOKEN' # campaign_uuid = 'YOUR_CAMPAIGN_UUID' # campaign_data = get_campaign_by_uuid(api_token, campaign_uuid) # if campaign_data: # print(campaign_data) ``` -------------------------------- ### Get Campaign by UUID - JavaScript Example Source: https://docs.hub88.io/developer-docs/operator-api-reference/freebets-api This JavaScript snippet shows how to fetch campaign information using a campaign UUID via an API call. It's suitable for frontend or backend JavaScript applications. ```javascript async function getCampaignByUuid(apiToken, campaignUuid) { const headers = { 'Authorization': `Bearer ${apiToken}` }; try { const response = await fetch(`https://api.hub88.io/v1/campaigns/${campaignUuid}`, { method: 'GET', headers: headers }); if (!response.ok) { const errorText = await response.text(); throw new Error(`Error: ${response.status} - ${errorText}`); } return await response.json(); } catch (error) { console.error('Failed to fetch campaign:', error); return null; } } // Example usage: // const apiToken = 'YOUR_API_TOKEN'; // const campaignUuid = 'YOUR_CAMPAIGN_UUID'; // getCampaignByUuid(apiToken, campaignUuid).then(campaignData => { // if (campaignData) { // console.log(campaignData); // } // }); ``` -------------------------------- ### Generate RSA Private/Public Key Pair (Bash) Source: https://docs.hub88.io/developer-docs/operator-api-reference/getting-started This snippet demonstrates how to generate an RSA private and public key pair using OpenSSL commands. These keys are used for verifying API requests, with the private key kept by the operator and the public key shared with Hub88. Ensure OpenSSL is installed on your system. ```bash openssl genrsa -out private.pem 2048 openssl rsa -pubout -in private.pem -out public.pem ``` -------------------------------- ### Sample Pagination Flow Source: https://docs.hub88.io/developer-docs/hub88-apis/pagination Illustrates a typical flow for navigating through paginated data using 'next_cursor' and 'previous_cursor'. ```APIDOC ## Sample Pagination Flow ### Description Demonstrates the step-by-step process of using cursors to retrieve subsequent or previous pages of results. ### 1. Initial Request (First Page) Make a request without providing a `cursor`. The response will contain the first set of results and potentially a `next_cursor`. ```json { "pagination": { "limit": 50 } } ``` ### 2. Requesting the Next Page Use the `next_cursor` value received in the previous response as the `cursor` for your next request. The `limit` can be specified or will default. ```json { "pagination": { "cursor": "eyJvZmZzZXQiOjUwMH0=", "limit": 50 } } ``` ### 3. Requesting the Previous Page Use the `previous_cursor` value received in a previous response as the `cursor` for your next request to go back to an earlier page. ```json { "pagination": { "cursor": "eyJvZmZzZXQiOjB9", "limit": 50 } } ``` ### Note If `next_cursor` is absent in the response, it signifies that you have reached the end of the available results. Similarly, if `previous_cursor` is absent, you are at the beginning of the dataset. ``` -------------------------------- ### Sample Initial Pagination Request (JSON) Source: https://docs.hub88.io/developer-docs/hub88-apis/pagination This JSON example shows the structure of an initial pagination request where no cursor is provided. When the 'cursor' parameter is omitted, the API returns the first page of results. The 'limit' parameter specifies the desired number of items per page. ```json "pagination": { "limit": "50" } ``` -------------------------------- ### Get Game Round Source: https://docs.hub88.io/developer-docs/operator-api-reference/games-api Retrieves details of a specific game round. ```APIDOC ## GET /game/round ### Description Retrieves details of a specific game round. ### Method GET ### Endpoint /game/round ### Parameters #### Query Parameters - **operator_id** (integer) - Required - Unique identifier for the Operator in Hub88 system. - **game_round_id** (string) - Required - The unique identifier for the game round. ### Request Example ```json { "operator_id": 123, "game_round_id": "round456" } ``` ### Response #### Success Response (200) - **game_round** (object) - Details of the game round. - **game_round_id** (string) - The unique identifier for the game round. - **game_code** (string) - The unique game identifier. - **player_id** (string) - The unique identifier for the player. - **start_time** (string) - The timestamp when the game round started. - **end_time** (string) - The timestamp when the game round ended. - **status** (string) - The status of the game round (e.g., "IN_PROGRESS", "COMPLETED", "ABANDONED"). - **bet_amount** (number) - The total amount bet in the game round. - **win_amount** (number) - The total amount won in the game round. #### Response Example ```json { "game_round": { "game_round_id": "round456", "game_code": "game123", "player_id": "player789", "start_time": "2023-10-27T10:00:00Z", "end_time": "2023-10-27T10:05:00Z", "status": "COMPLETED", "bet_amount": 10.50, "win_amount": 25.00 } } ``` ``` -------------------------------- ### Request Signing Logic Source: https://docs.hub88.io/developer-docs/operator-api-reference/operator-api-overview Details on how to sign all requests to the Operator API using RSA-SHA256 and the X-Hub88-Signature header. ```APIDOC ## Request Signing Logic for Operator API ### Description All requests to the Operator API must be signed using `RSA-SHA256` with the respective private key and encoded to BASE64. The resulting signature should be placed in the `X-Hub88-Signature` header. ### Signing Details - **Algorithm**: `RSA-SHA256` - **Encoding**: BASE64 - **Header**: `X-Hub88-Signature` ### Important Note Ensure the `X-Hub88-Signature` header contains no whitespaces or beautifiers. The signature must precisely match the body; any discrepancy will result in an "invalid signature" error. ### Request Example ```json { "user": "3nYTOSjdlF6UTz9Ir", "country": "XX", "currency": "EUR", "operator_id": 1, "token": "cd6bd8560f3bb8f84325152101adeb45", "platform": "GPL_DESKTOP", "game_code": "clt_dragonrising", "lang": "en", "lobby_url": "https://examplecasino.io", "ip": "::ffff:10.0.0.39" } ``` ### Signature Example ``` DYKK0KsSMayoyHcpFx32R57mZ8ey2r8U4RscT9LiWEFkd40V/f2n9JafsC+yuB8OSHz+wdCvyxvqacNiL8r3ZGEBdTL4lrcjdM5PWHQu8auYNp2mGE0tbX6/KGyk8nyQ3+h1HogIHj5hnMNYx0r+AhFT2tD/IT2b3Pq6oDPNL8rK0CbDCm8w7+gal1i0T1pDo61e2CTDTHpfm4ELEKcff2iiIRvgQ52nUCkuxQjCN/BGyEC1il0AVwlcb8CKU6Utg48UqvPLqu38qahI5X53zBMpLFIOtOYcFoepWmHvBxh0GDM4NIfQQ3Cm5sFyN3AsqzM7rqA0N9VZP0QPK8fA0g== ``` ``` -------------------------------- ### Get Game List Source: https://docs.hub88.io/developer-docs/operator-api-reference/games-api Retrieves a list of all available games that can be integrated. ```APIDOC ## GET /game/list ### Description Retrieves a list of all available games that can be integrated. ### Method GET ### Endpoint /game/list ### Parameters #### Query Parameters - **operator_id** (integer) - Required - Unique identifier for the Operator in Hub88 system. - **currency** (string) - Optional - The ISO 4217 currency code. The following list contains all currencies supported by our system. - **country** (string) - Optional - The ISO 3166-1 country code, applicable to the User in the current session. ### Request Example ```json { "operator_id": 123, "currency": "USD", "country": "US" } ``` ### Response #### Success Response (200) - **games** (array) - List of available games. - **game_code** (string) - The unique game identifier in Hub88 system. - **name** (string) - The name of the game. - **type** (string) - The type of the game (e.g., "SLOT", "TABLE"). - **url** (string) - The URL to launch the game. #### Response Example ```json { "games": [ { "game_code": "game123", "name": "Slot Machine", "type": "SLOT", "url": "https://game.hub88.io/game123" } ] } ``` ``` -------------------------------- ### Get user's info Source: https://docs.hub88.io/developer-docs/operator-api-reference/wallet-api Retrieves information about a user's wallet. ```APIDOC ## GET /users/info ### Description Retrieves information about a user's wallet. ### Method GET ### Endpoint /users/info ### Parameters #### Query Parameters - **user_id** (string) - Required - The unique identifier for the user. ### Request Example ``` GET /users/info?user_id=12345 ``` ### Response #### Success Response (200) - **balance** (number) - The current balance of the user's wallet. - **currency** (string) - The currency of the user's balance. #### Response Example ```json { "balance": 150.75, "currency": "USD" } ``` ``` -------------------------------- ### Game List and Details Source: https://docs.hub88.io/developer-docs/operator-api-reference/recommendations-api This section covers endpoints related to retrieving lists of available games and their specific details, including parameters like platform, country, and categories. ```APIDOC ## GET /game/list ### Description Retrieves a list of available games based on specified filters. ### Method GET ### Endpoint /game/list ### Parameters #### Query Parameters - **platform** (string) - Optional - The platform for which to retrieve games (e.g., "GPL_DESKTOP", "GPL_MOBILE"). - **country** (string) - Optional - The [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) country code for which to retrieve games. - **category** (string) - Optional - The game category to filter by (e.g., "Video Slots", "Live Roulette"). - **operator_id** (integer) - Required - Unique identifier for the Operator in Hub88 system. ### Response #### Success Response (200) - **games** (array) - List of available games. - **game_code** (string) - The unique game identifier. - **name** (string) - The name of the game. - **provider_name** (string) - The name of the game provider. - **picture_url** (string) - URL to the game's picture. - **demo_url** (string) - URL for the game demo. - **play_url** (string) - URL to play the game. - **category** (string) - The game category. - **popular** (boolean) - Indicates if the game is popular. - **new** (boolean) - Indicates if the game is new. - **rating** (number) - The rating of the game. - **min_bet** (number) - The minimum bet amount. - **max_bet** (number) - The maximum bet amount. - **rtp** (number) - Return To Player percentage. - **features** (array) - List of game features. - **paylines** (integer) - Maximum number of available paylines. - **hit_ratio** (string) - The Hit Ratio indicating winning/losing bet ratio. - **certifications** (array) - List of gaming authorities that certified the game. - **languages** (array) - List of supported languages (ISO 639-2 alpha-3 codes). - **theme** (array) - List of themes assigned to the game. - **technology** (array) - Technologies used within the game. - **score** (number) - Recommendation score. - **recommendation_id** (string) - Unique identifier for a recommendation. #### Response Example ```json { "games": [ { "game_code": "slot_game_1", "name": "Super Slots", "provider_name": "ProviderX", "picture_url": "https://example.com/images/super_slots.png", "demo_url": "https://example.com/demo/super_slots", "play_url": "https://example.com/play/super_slots", "category": "Video Slots", "popular": true, "new": false, "rating": 4.5, "min_bet": 0.1, "max_bet": 100.0, "rtp": 96.5, "features": ["Free Spins", "Bonus Round"], "paylines": 20, "hit_ratio": "0.35", "certifications": ["MGA"], "languages": ["eng"], "theme": ["Fantasy"], "technology": ["HTML5"], "score": 0.9 } ], "recommendation_id": "rec_12345" } ``` ## GET /game/details ### Description Retrieves detailed information about a specific game. ### Method GET ### Endpoint /game/details ### Parameters #### Query Parameters - **game_code** (string) - Required - The unique game identifier in Hub88 system. - **operator_id** (integer) - Required - Unique identifier for the Operator in Hub88 system. - **country** (string) - Optional - The [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) country code. - **platform** (string) - Optional - The platform for which to retrieve game details (e.g., "GPL_DESKTOP", "GPL_MOBILE"). ### Response #### Success Response (200) - **game_code** (string) - The unique game identifier. - **name** (string) - The name of the game. - **provider_name** (string) - The name of the game provider. - **picture_url** (string) - URL to the game's picture. - **demo_url** (string) - URL for the game demo. - **play_url** (string) - URL to play the game. - **category** (string) - The game category. - **popular** (boolean) - Indicates if the game is popular. - **new** (boolean) - Indicates if the game is new. - **rating** (number) - The rating of the game. - **min_bet** (number) - The minimum bet amount. - **max_bet** (number) - The maximum bet amount. - **rtp** (number) - Return To Player percentage. - **features** (array) - List of game features. - **paylines** (integer) - Maximum number of available paylines. - **hit_ratio** (string) - The Hit Ratio indicating winning/losing bet ratio. - **certifications** (array) - List of gaming authorities that certified the game. - **languages** (array) - List of supported languages (ISO 639-2 alpha-3 codes). - **theme** (array) - List of themes assigned to the game. - **technology** (array) - Technologies used within the game. - **score** (number) - Recommendation score. #### Response Example ```json { "game_code": "slot_game_1", "name": "Super Slots", "provider_name": "ProviderX", "picture_url": "https://example.com/images/super_slots.png", "demo_url": "https://example.com/demo/super_slots", "play_url": "https://example.com/play/super_slots", "category": "Video Slots", "popular": true, "new": false, "rating": 4.5, "min_bet": 0.1, "max_bet": 100.0, "rtp": 96.5, "features": ["Free Spins", "Bonus Round"], "paylines": 20, "hit_ratio": "0.35", "certifications": ["MGA"], "languages": ["eng"], "theme": ["Fantasy"], "technology": ["HTML5"], "score": 0.9 } ``` ``` -------------------------------- ### Wallet API Source: https://docs.hub88.io/developer-docs/operator-api-reference/operator-api-overview Details on signing and verification for the Wallet API, emphasizing idempotency. ```APIDOC ## Wallet API ### Description All **Wallet API** requests must be signed by Hub88, and the Operator is responsible for verifying these requests using the public key provided by Hub88. Additionally, Wallet API requests must be idempotent. ### Signing Requirements - **Signer**: Hub88 - **Verification**: Operator (using Hub88's public key) ### Idempotency - All transactions contain a `transaction_uuid` field. - Operators must ensure that requests with the same `transaction_uuid` are not processed twice. - The response must be the same for all duplicate requests. - The idempotency requirement may be ignored for the `/user/balance` call. ``` -------------------------------- ### Get a Game URL Source: https://docs.hub88.io/developer-docs/supplier-api-reference/games-api This endpoint allows you to retrieve a URL for a specific game. ```APIDOC ## GET /games ### Description Retrieves a URL for a specific game based on provided parameters. ### Method GET ### Endpoint /games ### Parameters #### Query Parameters - **game_id** (string) - Required - The unique identifier for the game. - **supplier_id** (string) - Required - The unique identifier for the supplier. - **player_id** (string) - Optional - The unique identifier for the player. ### Request Example GET /games?game_id=123&supplier_id=456&player_id=789 ### Response #### Success Response (200) - **game_url** (string) - The URL to access the game. #### Response Example { "game_url": "https://example.com/play?game=123&token=abc" } ``` -------------------------------- ### Get Wallet Balance Source: https://docs.hub88.io/developer-docs/operator-api-reference/transferwallet-api Retrieves the current balance of a user's wallet. ```APIDOC ## GET /wallet/balance ### Description Retrieves the current balance of a user's wallet. ### Method GET ### Endpoint /wallet/balance ### Parameters #### Query Parameters - **operator_id** (integer) - Required - Unique identifier for the Operator in Hub88 system. - **user_id** (string) - Required - Unique identifier for the user. - **product** (string) - Required - Name of the Game Provider. - **currency** (string) - Required - The currency of the wallet (e.g., EUR, USD, BTC). ### Request Example ```json { "operator_id": 12345, "user_id": "user123", "product": "SlotProvider", "currency": "EUR" } ``` ### Response #### Success Response (200) - **balance** (number) - The current balance of the user's wallet. - **currency** (string) - The currency of the balance. - **transaction_uuid** (string) - The unique transaction identifier. - **request_uuid** (string) - An ID for syncing Hub88 and Operator sides. #### Response Example ```json { "balance": 150.75, "currency": "EUR", "transaction_uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "request_uuid": "f0e9d8c7-b6a5-4321-fedc-ba9876543210" } ``` ``` -------------------------------- ### POST /operator/generic/v2/freebet/prepaids/list Source: https://docs.hub88.io/developer-docs/operator-api-reference/freebets-api Retrieves a list of all available prepaids. Prepaids with `bonus_buy` set to `true` are intended for free bonus buys and are not suitable for multiple bets. ```APIDOC ## POST /operator/generic/v2/freebet/prepaids/list ### Description Provides a list of all available prepaids. Prepaids with field `bonus_buy` set to `true` are meant to give a free bonus buy and are not suitable to be used for multiple (bet_count). ### Method POST ### Endpoint `/operator/generic/v2/freebet/prepaids/list` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **operator_id** (string) - Required - The unique identifier for the operator. - **game_code** (string) - Required - The unique identifier for the game. - **currency** (string) - Required - The ISO 4217 currency code. ### Request Example ```json { "operator_id": "YOUR_OPERATOR_ID", "game_code": "EXAMPLE_GAME_CODE", "currency": "USD" } ``` ### Response #### Success Response (200) - **(array of Prepaid objects)** - A list of available prepaid rewards. - **prepaid_uuid** (string) - Unique ID for the prepaid reward. - **game_code** (string) - The unique game identifier. - **currency** (string) - The ISO 4217 currency code. - **bet_value** (integer) - The amount of money for the bet, multiplied by 100000. - **bet_count** (integer or null) - The number of allowed bets. Null means no constraint. - **bonus_buy** (boolean) - Indicates if the prepaid is for a free bonus buy. - **meta** (object) - Legacy field for bonus buy prepaids (subject to deprecation). #### Response Example ```json [ { "prepaid_uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "game_code": "EXAMPLE_GAME_CODE", "currency": "USD", "bet_value": 5000000, "bet_count": 10, "bonus_buy": false, "meta": {} }, { "prepaid_uuid": "f0e9d8c7-b6a5-4321-0987-654321fedcba", "game_code": "ANOTHER_GAME_CODE", "currency": "EUR", "bet_value": 10000000, "bet_count": null, "bonus_buy": true, "meta": {} } ] ``` ### Error Handling (Details on potential errors and their status codes would typically be included here, but are not present in the source text.) ```