4.4 Deposit (存款)
Description (说明)
This function is to transfer player balance from Operator's wallet to Game Provider's wallet.
此功能用于将玩家余额从运营商钱包转移到游戏提供商钱包。
URL (网址)
https://{host}/api/deposit
Request Method
POST
Request Parameters (请求参数)
| Field (栏位) | Type (型态) | Required (必要) | Description (说明) |
|---|---|---|---|
| agentId | String | Y | Agent ID <= 50 characters 代理帐号 |
| userId | String | Y | User ID <= 50 characters 玩家帐号 |
| amount | String | Y | Amount to be deposit. (positive number) decimal places <= 4 存款金额 (数值必须为正数) |
| freeCredit | String | N | Free credit to be deposit. (positive number) decimal places <= 4 泥码存款额度 (数值必须为正数) if your company has not enabled the free credit function, then please ignore this attribute. 若贵司未开启泥码功能,则请忽略此属性 |
| transactionCode | String | Y | Transaction Code <= 30 characters 交易码 unique id using for avoid duplicate operation. 用于避免相同重复操作的唯一ID |
{
"agentId": "hrgag",
"userId": "hrgpl0001",
"amount": "100.0",
"freeCredit": "80.0",
"transactionCode": "1660914371059"
}
Return Result (返回结果)
| Field (栏位) | Type (型态) | Description (说明) |
|---|---|---|
| code | String | Status Code fixed 4 characters 状态码 |
| data | Object | |
| agentId | String | Agent ID <= 50 characters 代理帐号 |
| userId | String | User ID <= 50 characters 玩家帐号 |
| currency | String | fixed 3 characters 货币代码 |
| depositAmount | String | Deposit balance decimal places <= 4 存款总额 |
| currentBalance | String | Current account balance after deposit decimal places <= 4 存款后当前帐户余额 |
| currentFreeCredit | String | Current free credit after deposit decimal places <= 4 存款后当前帐户泥码余额 if your company has not enabled the free credit function, then please ignore this attribute. 若贵司未开启泥码功能,则请忽略此属性 |
{
"code": "0000",
"data": {
"agentId": "hrgag",
"userId": "hrgpl0001",
"currency": "THB",
"depositAmount": "180",
"currentBalance": "100",
"currentFreeCredit": "80"
}
}
Sample Request For Each Language (各语言请求范例)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"agentId\":\"hrgag\",\"userId\":\"hrgpl0001\",\"amount\":\"100.0\",\"freeCredit\":\"80.0\",\"transactionCode\":\"1660914371059\"}");
Request request = new Request.Builder()
.url("https://{host}/api/deposit")
.method("POST", body)
.addHeader("Authorization", "Basic TWpNQ0JSM1NFYnBrYXdSNTpNak1DQlIzU0VicGthd1I1")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();