Get wallet balance
LiveGET
/api/v1/profile/balanceFetch the member's credit balance — current balance, pending amount, and lifetime deposit/withdrawal totals.
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Used — send Bearer <member access_token> |
| X-Api-Key | string | Yes | Agent API key (ak_…) from the bo screen |
| X-Timestamp | string | Yes | Signing time in unix milliseconds (±300s skew allowed) |
| X-Nonce | string | Yes | Unique per-request value (UUIDv4) for replay protection |
| X-Signature | string | Yes | hex(HMAC-SHA256(secret, canonical)) — see the Authentication page |
| X-Player-IP | string | — | The player's real IP (IPv4/IPv6) — recommended (used in login history) |
| X-Player-UA | string | — | The player's User-Agent (optional — recorded in login history) |
| X-Request-Id | string | — | Your correlation id — echoed back as request_uuid (recommended) |
| x-lang | string | — | th (default) or en — the language of message |
Response
Fields in data
| Field | Type | Required | Description |
|---|---|---|---|
| balance | string | — | Available balance |
| pending | string | — | Amount held by in-flight operations, e.g. a withdrawal awaiting approval |
| total_deposit | string | — | Lifetime total deposits |
| total_withdrawal | string | — | Lifetime total withdrawals |
Response example
{
"success": true,
"code": 0,
"message": "สำเร็จ",
"data": {
"balance": "1250.50",
"pending": "0.00",
"total_deposit": "15000.00",
"total_withdrawal": "8200.00"
},
"request_uuid": "f83a5c21-9d64-4b07-a2e9-5c1f8d3b6a90"
}Possible error codes
| code | Name | HTTP | Message |
|---|---|---|---|
| 1001 | UNAUTHORIZED | 401 | UnauthorizedMissing Authorization: Bearer header |
| 1007 | TOKEN_INVALID | 401 | Token invalidInvalid/expired access token, or the session was revoked (logout) |
| 2002 | WALLET_NOT_FOUND | 404 | Wallet not found |