Wallet API钱包回调接口
Overview概览
Endpoints implemented by the merchant under its callbackUrl and called by the platform.由商户在 callbackUrl 下实现、平台调用的接口。
Implement five endpoints under your callbackUrl. All requests are signed by us with your secretKey (Signing) and come from our egress IPs.
商户在 callbackUrl 下实现五个接口。所有请求都由平台用商户的 secretKey 签名(签名),从平台出口 IP 发出。
| Endpoint接口 | Purpose作用 | Our timeout平台超时 |
|---|---|---|
POST /auth | Exchange a launch token for the player用进游戏 token 换玩家信息 | 5 s |
POST /balance | Read the balance (table entry, reconnect, refresh)查余额(进桌、断线重连、刷新) | s (in game we show the last known balance after 2 s)秒(游戏内等 2 秒就先显示上次的余额) |
POST /debit | Take a stake扣款(下注) | 5 s |
POST /credit | Pay a settlement (may be 0)派彩(可以是 0) | 10 s |
POST /rollback | Reverse one debit冲正一笔扣款 | 10 s |
Target P99 latency below 1 second. A timeout is treated as result unknown.
目标 P99 延迟低于 1 秒。超时按结果未知处理。
Common fields公共字段
All wallet requests except /auth contain:
除 /auth 外,所有钱包请求都有:
extPlayerIdstring
Your player id.商户侧玩家编号。
currencystring
Player currency.玩家币种。
/debit, /credit and /rollback also contain:
/debit、/credit、/rollback 还都有:
txnIdstring
Idempotency key.幂等键。
roundId · txnSeqstring · int
Wallet round and sequence.钱包局与序号。
amountstring
Amount of this transaction, ≥ 0.本笔金额,≥ 0。
platform · tableCode · gameTypestring
Where it happened (
tableCode as in games/list).在哪张桌(tableCode 与 games/list 一致)。platformRoundIdstring
The game platform's round id.游戏平台的局号。
createdAtstring
When we created the transaction; unchanged on retries.平台生成这笔交易的时间,重试时不变。