Get User Balance
The MINI.GAME platform calls this interface to obtain the player's current balance.
GetBalance
This API is provided by the integrator and is called by the MINI.GAME platform.
POST
{
ACCESS_URL
}/api/balance/get_balance?trace_id=minigame_trace_id
Headers
Content-Type
"application/json; charset=utf-8"
sign
"minigame
_sign_string"
Body
app_id
string
The unique identifier for the merchant, available in the merchant backend.
game_id
integer optional
Game ID
player_login_token
stringoptional
The user token uploaded by the integration partner, the login credential, which is the token verified successfully by the /api/user/verify_session interface.
uname
string
User ID provided by the integrator
currency
string
Currency name, for details, refer to the "name" field of the supported currencies in the currency list.
timestamp
integer
timestamp (in seconds)
MINI.GAME Platform Request Parameter Example
{
"app_id": "13",
"player_login_token": "50f15a92-ee8d-11ee-9a61-00ff3fae08f7",
"uname": "1003803",
"game_id": 9,
"currency":"usdt",
"timestamp": 1711954264
}
Integrator Response Parameter Example
{
"data": {
"balance": "4299.1"
},
"code": 1,
"msg": "ok"
}
}
Integrator Response Parameter Example Description
The MINI.GAME platform only records the numerical value of the balance, and the specific currency unit is determined based on the accessing party's backend selection.
data
Yes
object
Response Data
balance
Yes
string (decimal)
User balance, supports up to 4 decimal places
code
Yes
integer
Status Code
msg
Yes
string
Prompt message
Error Code
Last updated