Check Balance

Live
POST{base}/api/balance

Get the current balance.

Always reply HTTP 200 even for business errors

Headers

FieldTypeRequiredDescription
X-Api-KeystringYesThe API key best-system issued to you (verify it matches)
X-SignaturestringYeshex(HMAC-SHA256(secret, raw body)) — verify against the raw bytes, never re-serialize. Mismatch → code 30002

Request bodyapplication/json

FieldTypeRequiredDescription
request_idstringYesId of this request
player_usernamestringYesThe player's username on your system
currencystringYesThe player's currency code in ISO 4217, e.g. THB
product_codestring—Game-provider code (e.g. PGSOFT)
timestampnumberYesSend 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

FieldTypeRequiredDescription
codenumberYes0 = success
request_idstringYesEchoed from the request
usernamestringYesplayer_username
currencystringYesEchoed from the request
balancenumberYesCurrent balance
timestampnumberYesWhen 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

codeNameHTTPMessage
10001SEAMLESS_USER_NOT_FOUND200Player not found on the agent system
30002SEAMLESS_INVALID_SIGNATURE401Invalid X-Signature
40003SEAMLESS_FORBIDDEN200Forbidden (api-key/IP)
50001SEAMLESS_INTERNAL_ERROR200Internal error on the agent system