4.1 Get Balance (取得玩家余额) (由运营商实现)
Description (说明)
This function can help game providers to sync player’s balance periodically.
此功能可让游戏商定期同步玩家的余额。
URL (网址)
{callbackURL}/get_balance
Request Method
POST
Request Parameters (请求参数)
Field (栏位) | Type (型态) | Required (必要) | Description (说明) |
|---|
| userId | String | Y | User ID <= 50 characters 玩家帐号 |
{
"userId": "hrgpl0001"
}
Return Result (返回结果)
Field (栏位) | Type (型态) | Required (必要) | Description (说明) |
|---|
| code | String | Y | Status Code fixed 4 characters 状态码
Please refer to 5.4 Status Code to find the appropriate status code to return. If there is no relevant status code, please respond to 9999. 詳見 5.4 状态代码,请参考状态码列表,找寻适当的状态码回传,如果没有相关状态码才请回应9999 |
| balanceTs | String | Y | Account balance update time fixed 28 characters 帐户余额更新时间
please return the player account balance update completion time. 请回传玩家帐号余额更新完成时间
format 格式 yyyy-MM-dd'T'HH:mm:ss.SSSZ timezone 时区 GMT+8 |
| balance | String | Y | Account balance after cancel bet. (real credit plus free credit) decimal places <= 4 取消下注后帐户余额 (现金码余额 + 泥碼余额) |
| realCredit | String | N | Real credit after cancel bet. decimal places <= 4 取消下注后现金码余额
if your company has not enabled the free credit function, then no need to return this attribute 若贵司未开启泥码功能,则不须回传此属性
v24.3.2 update
|
| freeCredit | String | N | Free credit after cancel bet. decimal places <= 4 取消下注后泥碼余额
if your company has not enabled the free credit function, then no need to return this attribute 若贵司未开启泥码功能,则不须回传此属性
v24.3.2 update
|
| desc | String | N | If code is not 0000 then return description for this failure. 描述错误原因,当code非0000时需填入 |
Scenario 1 (范例 1)
Not enabled the free credit function. 未开启泥码功能
{
"code": "0000",
"balance": "100.0",
"balanceTs": "2022-10-14T23:00:00.000+0800",
"desc": ""
}
Scenario 2 (范例 2)
Enabled the free credit function. 开启泥码功能
{
"code": "0000",
"balance": "100.0",
"realCredit": "90.0",
"freeCredit": "10.0",
"balanceTs": "2022-10-14T23:00:00.000+0800",
"desc": ""
}
Field (栏位) | Type (型态) | Required (必要) | Description (说明) |
|---|
| code | String | Y | Status Code fixed 4 characters 状态码
Please refer to 5.4 Status Code to find the appropriate status code to return. If there is no relevant status code, please respond to 9999. 詳見 5.4 状态代码,请参考状态码列表,找寻适当的状态码回传,如果没有相关状态码才请回应9999 |
| desc | String | Y | If code is not 0000 then return description for this failure. 描述错误原因,当code非0000时需填入 |
Scenario 1 (范例 1)
{
"code": "9999",
"desc": "unknown error"
}