一. 基本资讯
- 本文档由 Wallet-API 和 Game-API 组成。
- Wallet-API 是 games 要变更玩家余额,而向接入方请求的 API,由接入方实现。
- Game-API 是接入方向 games 请求进入游戏的 URL、游戏相关数据的 API。
- 所有 API 都是 POST method 且仅支持 application/json。
二. Wallet-API 说明
Request 参数说明
| 参数 | 说明 | 类型 |
|---|---|---|
| productId | 产品号 | String |
| timestamp | UNIX time,毫秒 | Number |
| params | 请求参数 | Object |
| key | 签名,详见签名算法 | String{64} |
| uuid | 自定义的唯一性请求序号 | String{64} |
签名算法
签名值 key 是对 params 的 productId、uuid 依序取值添加钱包金钥后,hash sha256 的结果;SHA256(productId+uuid+玩家金钥) 下述以钱包金钥 52342182001A068859C20EB08F738839 举例说明:Request example
Response 参数说明
| 参数 | 说明 | 类型 |
|---|---|---|
| code | 错误代码 | Number |
| message | 错误讯息 | String |
| requestID | 自定义的唯一性请求序号 | String{64} |
| data | 回传资料 | Object |
Response example