Check Balance
LivePOST
{base}/api/balanceGet the current balance.
Always reply HTTP 200 even for business errors
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| X-Api-Key | string | Yes | The API key best-system issued to you (verify it matches) |
| X-Signature | string | Yes | hex(HMAC-SHA256(secret, raw body)) — verify against the raw bytes, never re-serialize. Mismatch → code 30002 |
Request bodyapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| request_id | string | Yes | Id of this request |
| player_username | string | Yes | The player's username on your system |
| currency | string | Yes | The player's currency code in ISO 4217, e.g. THB |
| product_code | string | — | Game-provider code (e.g. PGSOFT) |
| timestamp | number | Yes | Send time in unix milliseconds |
Request example
{
"request_id": "9b6ad1a2-5a3f-4d0e-8c7b-1f2e3d4c5b6a",
"player_username": "foobar",
"currency": "THB",
"timestamp": 1783236600000
}Expected Response
Fields in data
| Field | Type | Required | Description |
|---|---|---|---|
| code | number | Yes | 0 = success |
| request_id | string | Yes | Echoed from the request |
| username | string | Yes | player_username |
| currency | string | Yes | Echoed from the request |
| balance | number | Yes | Current balance |
| timestamp | number | Yes | When you replied (unix ms) |
Response example
{
"code": 0,
"request_id": "9b6ad1a2-5a3f-4d0e-8c7b-1f2e3d4c5b6a",
"username": "foobar",
"currency": "THB",
"balance": 1000,
"timestamp": 1783236600120
}Possible error codes
| code | Name | HTTP | Message |
|---|---|---|---|
| 10001 | SEAMLESS_USER_NOT_FOUND | 200 | Player not found on the agent system |
| 30002 | SEAMLESS_INVALID_SIGNATURE | 401 | Invalid X-Signature |
| 40003 | SEAMLESS_FORBIDDEN | 200 | Forbidden (api-key/IP) |
| 50001 | SEAMLESS_INTERNAL_ERROR | 200 | Internal error on the agent system |