API for Integrating with the CodeHub94 Gaming Platform
This API provides endpoints for integrating with the CodeHub94 gaming platform.
https://apis.codehub94.shop/api/
All endpoints use the POST method with JSON request bodies. Responses are JSON.
Authentication is handled via the agency_uid field in the request body, which serves as your API key. The home_url host must match the whitelisted domain.
The following parameters are common across most endpoints:
| Parameter | Type | Required | Description |
|---|---|---|---|
| agency_uid | String | Yes | API key. |
| member_account | String | Yes | Player account ID. Must start with 'hfb20f' followed by your custom identifier, and end with your assigned suffix (case-insensitive, trimmed). Contact support for your suffix. |
| timestamp | Integer | Yes | Unix timestamp in milliseconds. |
| credit_amount | Float | Varies | Amount for credit/transfer. |
| currency_code | String | Yes | Currency code (e.g., "USD"). |
| language | String | Yes | Language code (e.g., "en"). |
| platform | String | Yes | Platform identifier (e.g., "web"). |
| home_url | String | Yes | Full home URL. |
| transfer_id | String | Yes | Unique transfer ID. |
Fetches the player's balance.
URL: /getBalance.php
Method: POST
Uses common parameters; game_uid is optional. Set credit_amount to 0.
{
"agency_uid": "your_api_key",
"member_account": "hfb20f_player123_yoursuffix",
"timestamp": 1698755432000,
"credit_amount": 0.0,
"currency_code": "USD",
"language": "en",
"platform": "web",
"home_url": "https://yourdomain.com/home",
"transfer_id": "txn_abc123"
}
Status: 200 OK
{
"code": 0,
"msg": "Succeed",
"payload": { "after_amount": 150.5 }
}
Launches a game session.
URL: /gameLaunch.php
Method: POST
| Parameter | Type | Required | Description |
|---|---|---|---|
| game_uid | String | Yes | Game ID. |
{
"agency_uid": "your_api_key",
"member_account": "hfb20f_player123_yoursuffix",
"game_uid": "game123",
"timestamp": 1698755432000,
"credit_amount": 100.0,
"currency_code": "USD",
"language": "en",
"platform": "web",
"home_url": "https://yourdomain.com/home",
"transfer_id": "txn_abc123"
}
Status: 200 OK
{
"code": 0,
"msg": "Succeed",
"payload": { "game_launch_url": "https://codehub94.shop/game-launch?transfer_id=txn_abc123" }
}
Withdraws the balance if available.
URL: /getWithdraw.php
Method: POST
Uses common parameters.
{
"agency_uid": "your_api_key",
"member_account": "hfb20f_player123_yoursuffix",
"timestamp": 1698755432000,
"credit_amount": 0.0,
"currency_code": "USD",
"language": "en",
"platform": "web",
"home_url": "https://yourdomain.com/home",
"transfer_id": "txn_abc123"
}
Status: 200 OK
{
"status": true,
"message": "Withdraw successful",
"amount": 150.5
}
Retrieves bet transactions.
URL: /callback.php
Method: POST
| Parameter | Type | Required | Description |
|---|---|---|---|
| agency_uid | String | Yes | API key. |
{
"agency_uid": "your_api_key"
}
Status: 200 OK
{
"code": 0,
"msg": "Bet data retrieved successfully",
"msgCode": 0,
"serviceNowTime": "2025-10-08 12:34:56",
"data": {
"user_id": 1,
"api_key": "your_api_key",
"transactions": [
{
"id": 1,
"user_id": 1,
"txn_id": "bet123",
"game_name": "Slots",
"bet": 10.0,
"win": 20.0,
"result": "win",
"created_at": "2025-10-08 12:00:00",
"updated_at": "2025-10-08 12:00:00"
}
],
"timestamp": "2025-10-08 12:34:56"
}
}
0: Success2: Internal error4: Validation/auth error7: Invalid input