资金转账
将资金转入或转出玩家在游戏商的钱包。
接口信息
| 属性 | 值 |
|---|---|
| 路径 | POST /papi/v1/player/transfer |
| 认证 | Agent Token(Bearer) |
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
provider | string | 是 | 游戏商标识 |
operator_code | string | 是 | 运营商编码 |
currency | string | 是 | 货币代码 |
username | string | 是 | 玩家用户名 |
amount | decimal | 是 | 转账金额(正数 = 转入/充值,负数 = 转出/提现) |
transfer_id | string | 是 | 转账唯一流水号(幂等性控制) |
transfer_type | string | 是 | 转账类型:deposit(转入)/ withdraw(转出) |
请求示例
json
{
"provider": "BG",
"operator_code": "OP001",
"currency": "CNY",
"username": "player_001",
"amount": 500.00,
"transfer_id": "TXN20260326001",
"transfer_type": "deposit"
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
transfer_id | string | 转账流水号 |
username | string | 玩家用户名 |
amount | decimal | 实际转账金额 |
balance_before | decimal | 转账前余额 |
balance_after | decimal | 转账后余额 |
status | string | 转账状态:success / failed / pending |
响应示例
json
{
"code": 0,
"message": "success",
"data": {
"transfer_id": "TXN20260326001",
"username": "player_001",
"amount": 500.00,
"balance_before": 1000.00,
"balance_after": 1500.00,
"status": "success"
},
"timestamp": 1711411200000,
"request_id": "req_ghi789"
}Seamless 钱包模式
SA 和 WM 采用 Seamless(无缝钱包)模式,资金变动通过游戏商回调自动完成,一般不需要主动调用转账接口。BG 和 GSC 支持主动转账模式。
游戏商映射
| 游戏商 | 对应接口 | 备注 |
|---|---|---|
| BG | open.operator.user.transfer | JSON-RPC 2.0,正数充值/负数提现 |
| GSC | seamless/withdraw + seamless/deposit | 分离式接口,withdraw = 扣款,deposit = 入账 |
| SA | Seamless 钱包模式 | 通过回调自动处理,无需主动调用转账 |
| WM | Seamless 钱包模式 | 通过 Webhook pointInout 自动处理 |