Introduction简介
Overview of the integration: the Platform API, the Wallet API and the onboarding materials.接入概览:平台接口、钱包回调接口与接入准备。
The integration has two directions. Both use the same transport, signing and result-code rules (Conventions, Result codes).
对接分两个方向,传输、签名、结果码规则完全相同(通用约定、结果码)。
Launch a player →让玩家进游戏 →
The four-step flow from your lobby to our table.从商户大厅到平台机台的四步。Sign requests →请求签名 →
HMAC-SHA256 over method, path, merchant code, time, id and body.对方法、路径、商户编码、时间、编号与正文做 HMAC-SHA256。Signing toolkits →签名工具包 →
Drop-in files for Python, Node.js, Go, Java, PHP, C#, Ruby and bash.Python、Node.js、Go、Java、PHP、C#、Ruby、bash 现成文件。Build your wallet →实现钱包 →
Wallet rounds, idempotency by txnId, retries and rollbacks.钱包局、按 txnId 幂等、重试与冲正。Platform API — you call us平台接口 —— 商户调用
Get the game catalog, create a launch URL for a player, and get a one-time report link for a finished round.
拉游戏目录、给玩家生成进游戏地址、给已结束的一局签一次性报表链接。
Base地址: https://<API_HOST>/merchant/v1
Wallet API — we call you钱包接口 —— 平台调用商户
You implement five endpoints under your callbackUrl: auth, balance, debit, credit, rollback.
商户在自己的 callbackUrl 下实现五个接口:auth、balance、debit、credit、rollback。
Base: your callbackUrl, e.g.地址:商户的 callbackUrl,如 https://wallet.example.com/live
Seamless wallet. Player funds stay in your wallet. Every stake is a debit, every settlement is a credit, and every reversal is a rollback, sent to you in real time. Your wallet is the single source of truth for the balance.
单一钱包。玩家的钱始终在商户钱包里。每次下注是一笔 debit(扣款),每次结算是一笔 credit(派彩),每次撤销是一笔 rollback(冲正),都实时发给商户。余额以商户钱包为准。
Multiple debits per round. One wallet round may contain any number of debits and credits (for example single-player blackjack: main bet, insurance, split, double down). Deduplicate by txnId only — never by round + type. See Wallet round model.
一局多次扣款。一个钱包局里可以有任意多笔扣款和派彩(例如单机 21 点:主注、保险、分牌、加倍)。只按 txnId 去重,不许按「局 + 类型」去重。见 钱包局模型。
Onboarding接入准备
We provide平台提供
merchantCode— your merchant identity in every requestsecretKey— shared HMAC key (both directions)<API_HOST>per environment (staging / production)- Our egress IP addresses — whitelist all of them for your Wallet API
merchantCode—— 商户编码,每个请求都带secretKey—— 签名密钥(两个方向共用)- 各环境(测试 / 正式)的
<API_HOST> - 平台出口 IP 列表 —— 请全部加入钱包接口的白名单
You provide商户提供
callbackUrl— base URL of your Wallet API- Your server IPs that will call the Platform API (optional whitelist)
- Default
homeUrlandcashierUrl - One test player and its test token for the conformance test (API conformance test)
callbackUrl—— 钱包接口的基地址- 调用平台接口的服务器 IP(可选,用于白名单)
- 默认的
homeUrl(返回商户)与cashierUrl(充值) - 对接测试用的一个测试玩家及其测试 token(接口对接测试)