入账
描述
玩家收到资金(赢得游戏、退款等)触发的回调。
请求方式
| Item | Name | Sample |
|---|---|---|
| Path | Path | <MerchantHost>/credit Like: http://www.game.com/credit |
| Request Method | Post |
请求参数
| Name | Type | Required | Description |
|---|---|---|---|
| Sign Params | Y | Api 接入规范 | |
| biz_id | string | Y | 订单流水号 |
| round_id | string | Y | 游戏当局 Id |
| game_id | int | N | 游戏 Id |
| game_code | string | Y | 游戏索引 用于获取游戏数据 |
| user_id | string | Y | 用户唯一标识 |
| currency | string | Y | 币种 |
| amount | string | Y | 金额 |
| game_name | string | Y | 游戏名称 |
返回参数
| Name | Type | Required | Description |
|---|---|---|---|
| code | int | Y | |
| msg | string | Y | 对应 code 的错误描述 |
| data | object | Y | Body |
| data.balance | object | Y | 余额对象 |
| balance.user_id | string | Y | 用户唯一标识 |
| balance.currency | string | Y | 币种 |
| balance.amount | string | Y | 金额 |
请求示例
Http Request
Post Method
URL : <MerchantHost>/credit?mid=1697028447&sign=30700e51895537ab9e375d048a76ad8cb0b9e447c65db968f83e9f98cb6e9607&ts=1713768205
{"biz_id":"1782255166111227905","round_id":"1782299428861145088","game_code":"gp_classic_4","user_id":"jUhNj+meQ16inuksiKj0zR88","currency":"PHP","amount":"31.21","reason":"win","game_name":"scratch_match"}
Http Response(success)
{
"code": 0,
"msg": "",
"data": {
"balance": {
"amount": "35.64",
"currency": "PHP",
"user_id": "jUhNj+meQ16inuksiKj0zR88"
}
}
}