Seamless Wallet Integration Guide
BITUP Partner API enables seamless integration between partner systems and the BITUP betting platform. Partners can manage user accounts, process bets, and handle payouts through a secure callback-based architecture.
https://bet.bitupgo.com/api/partner.php
All requests require the X-Partner-Key header with your assigned secret key.
X-Partner-Key: your_callback_secret_key
All responses are JSON with success boolean field.
POST /api/partner.php?action=login
Generate a single sign-on URL for a user. Auto-registers if user doesn't exist.
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | Username |
| user_pw | string | Yes | Password |
| nickname | string | No | Display name (defaults to user_id) |
{
"success": true,
"login_url": "https://bet.bitupgo.com/auth/token_login.php?token=abc123...",
"expires_in": 60
}
GET /api/partner.php?action=balance&user_id=xxx
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | Username |
{
"success": true,
"data": {
"user_id": "username",
"nickname": "display_name",
"balance": 500000.00
}
}
GET /api/partner.php?action=result&tx_id=xxx
Get bet result by transaction ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
| tx_id | string | Yes | Transaction ID from debit callback |
{
"success": true,
"data": {
"tx_id": "tx_xxx",
"user_id": "username",
"game_id": "202601270001",
"bet_type": "UP",
"amount": 10000.00,
"approved_amount": 10000.00,
"win_amount": 19500.00,
"profit": 9500.00,
"result": "win",
"start_price": 100000.50,
"end_price": 101000.50,
"round_result": "UP",
"status": "approved",
"created_at": "2026-01-27 12:34:56",
"settled_at": "2026-01-27 12:35:30"
}
}
GET /api/partner.php?action=history&user_id=xxx
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | Username |
| limit | int | No | Records per page (default 20, max 100) |
| offset | int | No | Pagination offset (default 0) |
{
"success": true,
"data": [
{
"tx_id": "tx_xxx",
"bet_type": "UP",
"amount": 10000.00,
"win_amount": 19500.00,
"result": "win",
"game_id": "202601270001",
"created_at": "2026-01-27 12:34:56"
}
]
}
POST /api/partner.php?action=create_partner
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | Username |
| user_pw | string | Yes | Password (min 4 chars) |
| nickname | string | No | Display name |
| commission_rate | float | No | Commission % (0 ~ your rate) |
| prefix | string | Yes | 3-16 chars, uppercase alphanumeric + underscore |
{
"success": true,
"partner": {
"user_id": 123,
"username": "PREFIX_username",
"partner_code": "PREFIX_ABC123",
"commission_rate": 2.0
}
}
GET /api/partner.php?action=commission
| Parameter | Type | Required | Description |
|---|---|---|---|
| date_from | string | No | Start date Y-m-d (default: 7 days ago) |
| date_to | string | No | End date Y-m-d (default: today) |
| game_type | string | No | "30s" or "60s" |
{
"success": true,
"summary": {
"total_count": 150,
"total_commission": 50000.00,
"total_bet_amount": 1000000.00
},
"data": [...]
}
When a partner enables seamless wallet mode, BITUP sends HTTP callbacks to the partner's configured URLs for all balance operations.
POST {your_callback_url}
Content-Type: application/json
X-Signature: HMAC-SHA256(request_body, callback_secret_key)
X-Partner-Id: {partner_id}
// Success
{ "success": true, "balance": 490000.00, "tx_id": "tx_xxx" }
// Failure
{ "success": false, "error": "Insufficient balance" }
POST {callback_balance_url}
{
"action": "balance",
"user_id": "username",
"timestamp": 1672531200
}
Expected Response:
{ "success": true, "balance": 500000.00 }
POST {callback_debit_url}
{
"action": "debit",
"user_id": "username",
"game_id": "202601270001",
"game_type": "30s",
"amount": 10000.00,
"tx_id": "tx_abc123",
"timestamp": 1672531200
}
Expected Response:
{ "success": true, "balance": 490000.00, "tx_id": "tx_abc123" }
POST {callback_credit_url}
{
"action": "credit",
"user_id": "username",
"game_id": "202601270001",
"game_type": "30s",
"win_amount": 19500.00,
"tx_id": "tx_abc123",
"start_price": 100000.50,
"end_price": 101000.50,
"result": "UP",
"timestamp": 1672531200
}
Expected Response:
{ "success": true, "balance": 509500.00 }
POST {callback_cancel_url}
{
"action": "cancel",
"user_id": "username",
"game_id": "202601270001",
"amount": 10000.00,
"tx_id": "tx_abc123",
"void_reason": "Round cancelled",
"timestamp": 1672531200
}
Expected Response:
{ "success": true, "balance": 500000.00 }
Partners have an egg balance that acts as both a betting limit and GGR settlement ledger.
| Event | Egg Change | Description |
|---|---|---|
| User places bet | -stake | Partner egg decreases |
| User wins | +payout | Partner egg increases (house covers) |
| User loses | No change | Stake already deducted = partner profit |
| Bet cancelled/void | +stake | Refunded to partner |
| HTTP Code | Description |
|---|---|
| 200 | Success (check success field in body) |
| 401 | Invalid or missing X-Partner-Key |
| 400 | Missing required parameters or invalid action |
| 500 | Server error |
| Type | Duration | Payout Rate | Description |
|---|---|---|---|
| 30s | 30 seconds | 1.95x | BTC price UP/DOWN prediction |
| 60s | 60 seconds | 1.95x | BTC price UP/DOWN prediction |
callback_secret_key securely. Never expose in client-side code.X-Signature on incoming callbacks.tx_id — same tx_id should not be processed twice.