Credit() API

这类似于借记 API 请求。 此 API 请求用于将货币金额计入玩家的账户余额。 每当玩家从游戏中赢得货币价值时,就会进行此操作。 它的响应将包含所有记入金额的信息。

Credit() 请求

类型输入
HTTP 方法POST
API URLhttps://<API_BASE_URL> /credit
标题"Content-Type": "application/json"
POST参数<{
    “token”: “cc918a3e4dea45ef5c31d6e3b9dce4afed3c02eb”,
    “account_id”: “259823”,
    “amount”: 2500,
    “amount_type”: “real”,
    “currency”: “GBP”,
    “game_id”: 1,
    “transaction_id”: “123456”,
    “round_id”: 198909,
    “game_type”: “slots”,
    “game_name”: “testgamename”,
    “note”: “credit”,
    “round_end_state”: true,
    “bonus_id”: “test2147hff”,
    “isfreespin”: true
}code>json对象 eg:
{
"token": "cc918a3e4dea45ef5c31d6e3b9dce4afed3c02eb",
"account_id": "259823",
"amount": 2500,
"amount_type": "real",
"currency": "GBP",
"game_id": 1、
"transaction_id": "123456",
"round_id": 198909,
"game_type": "slots",
"game_name": "testgamename",
/> "note": "credit",
"round_end_state": true,
"bonus_id": "test2147hff",
"isfreespin": true

td>Boolean td>bonus_id
参数类型描述
token字符串分配给每个玩家的唯一字符串(会话 ID)。
account_id字符串玩家账号
amount整数记入玩家钱包的金额
amount_type字符串表示金额类型。 可以是real / promo_freespin。
currencyString玩家的货币
game_idInteger< /code>游戏唯一ID
transaction_idString交易唯一id
round_id 整数每次游戏/旋转的回合 ID。
game_typeString游戏类型。老虎机/桌上游戏/刮刮卡/宾果游戏
game_nameString游戏名称
noteString< /code>关于信用请求的额外信息
round_end_statetrue 表示回合结束
false 表示回合开始
String提供商将发送与促销免费旋转相关的奖金/活动 ID . 实模式下为null.
isfreespinsBoolean true 表示它是 freespin。
false 表示它不是 freespin。

Credit() 响应 + 示例

{ "status": 0, "account_id": "123123", "country": "US", "token": "3c2ef39d02581e2db3ddf6c713e83e05", "balance": 12345, "currency": "USD", "transaction_id": "205354854449856", "bonus_amount": "10" }
/tr>
响应对象中的对象/Key类型描述
status整数响应状态
account_id字符串玩家账号ID。
country字符串玩家国家
token字符串分配给每个玩家的唯一字符串(会话 ID
balance整数玩家余额
currency字符串玩家货币种类
transaction_id字符串记入交易ID
bonus_amount整数玩家钱包中可用的奖金数额。 如果此金额不可用,请发送 0 值。