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
(说明)
agentIdStringYAgent ID <= 50 characters
代理帐号
userIdStringYUser ID <= 50 characters
玩家帐号
amountStringYAmount to be deposit. (positive number) decimal places <= 4
存款金额 (数值必须为正数)
freeCreditStringNFree credit to be deposit. (positive number) decimal places <= 4
泥码存款额度 (数值必须为正数)

if your company has not enabled the free credit function, then please ignore this attribute.
若贵司未开启泥码功能,则请忽略此属性
transactionCodeStringYTransaction 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
(说明)
codeStringStatus Code fixed 4 characters
状态码

Please refer to 5.4 Status Code for details.
详情请参考 5.4 状态代码
dataObject
agentIdStringAgent ID <= 50 characters
代理帐号
userIdStringUser ID <= 50 characters
玩家帐号
currencyStringfixed 3 characters
货币代码

Please refer to 5.2 Currencies for details.
详情请参考 5.2 货币类型
depositAmountStringDeposit balance decimal places <= 4
存款总额
currentBalanceStringCurrent account balance after deposit decimal places <= 4
存款后当前帐户余额
currentFreeCreditStringCurrent 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();