用于创建存款和提款交易,并通过 refId 发起存款操作
executeTransactionByRefId
方法 : [Post]
路径 : {{domain}}/ext/createDepositWithdrawPendingTransaction/{{prefix}}/{{agentUsername}}
内容类型 : application/json
{
"agentUsername": "{{agentUsername}}",
"key": "{{key}}",
"username": "{{agentUsername}}ninemb01",
"action":"DEPOSIT",
"balance":10,
"isDp": true
"web": "{{whiteLabel}}"
}
| 键 | 类型 | 示例值 | 描述 |
|---|
| agentUsername | String | testag | 使用的代理 |
| key | String | tnyENKDWvOkBXpvm6UZVa | 代理的密钥 |
| username | String | testagninemb01 | 需要存款的用户名 |
| action | String | DEPOSIT | 交易的动作(DEPOSIT,WITHDRAW) |
| balance | Number | 10 | 存款金额 |
| isDp | Boolean | true | true表示存款交易,false表示存款退款,不计入盈亏和投注额 |
| web | String | sportbook101 | 使用的网站 |
{
"code": 0,
"data": {
"refId": "644cc2e6d4e63e12dfdf0cff",
"isDp": true,
"user": "testninemb01",
"actionBy": "API",
"currency": "THB",
"action": "DEPOSIT",
"amount": 10,
"ip": "151.31.164.56",
"date": "2023-04-29T07:10:30.132Z",
"transaction": "pending"
},
"msg": "SUCCESS"
}
| 键 | 类型 | 示例值 | 描述 |
|---|
| code | Number | 0 | API 响应代码。 |
| msg | String | success | 响应代码的描述。 |
| data | Object | { "refId": "644cc2e6d4e63e12dfdf0cff", "isDp": true, "user": "testninemb01", "actionBy": "API", "currency": "THB", "action": "DEPOSIT", "amount": 10, "ip": "151.31.164.56", "date": "2023-04-29T07:10:30.132Z", "transaction": "pending" } | 待处理的存款交易数据 |
| 值 | 信息 |
|---|
| 0 | 成功 |
| 100001 | 缺少 'agent Username' 字段。 |
| 100002 | 'agentUsername' 必须为字符串。 |
| 100003 | 缺少 'key' 字段。 |
| 100004 | 'Key' 必须为字符串。 |
| 100005 | 缺少 'username' 字段。 |
| 100006 | 'Username' 必须为字符串。 |
| 100009 | 用户名长度必须在 8 到 24 个字符之间。 |
| 100012 | 未找到密钥。 |
| 100013 | 未找到代理。 |
| 100014 | 未找到会员。 |
| 100015 | 'balance' 字段格式无效。 |
| 100016 | 余额不足。 |
| 100017 | 您进行了多次交易,请等待1分钟后重试。 |
用于通过 refId 执行存款和提款操作
Create Pending Transaction
并可以查看存款和提款的交易状态
Get Transaction By RefId
方法 : [Post]
路径 : {{domain}}/ext/executeTransactionByRefId/{{prefix}}/{{agentUsername}}
内容类型 : application/json
{
"agentUsername": "{{agentUsername}}",
"key": "{{key}}",
"username": "{{agentUsername}}ninemb01",
"refId":"644cc2e6d4e63e12dfdf0cff",
"web": "{{whiteLabel}}"
}
| 键 | 类型 | 示例值 | 描述 |
|---|
| agentUsername | String | testag | 使用的代理 |
| key | String | tnyENKDWvOkBXpvm6UZVa | 代理的密钥 |
| username | String | testagninemb01 | 需要存款的用户名 |
| refId | String | 644cc2e6d4e63e12dfdf0cff | 用于执行存款操作的 refId 来自“创建待处理交易”接口 |
| web | String | sportbook101 | 使用的网站 |
{
"code": 0,
"data": {
"beforeCredit": 71,
"afterCredit": 81,
"refId": "644cc2e6d4e63e72dfdf0cff",
"agent": {
"beforeCredit": 49929,
"afterCredit": 49919
}
},
"msg": "SUCCESS"
}
| 键名 | 类型 | 示例值 | 描述 |
|---|
| code | Number | 0 | API 响应代码。 |
| msg | String | success | 响应代码的描述。 |
| data | Object | { "beforeCredit": 71, "afterCredit": 81, "refId": "644cc2e6d4e63e72dfdf0cff", "agent": { "beforeCredit": 49929, "afterCredit": 49919 } } | 存款交易数据和交易前后余额 |
| 值 | 信息 |
|---|
| 0 | 成功 |
| 100001 | 缺少 'agent Username' 字段。 |
| 100002 | 'agentUsername' 必须为字符串。 |
| 100003 | 缺少 'key' 字段。 |
| 100004 | 'Key' 必须为字符串。 |
| 100005 | 缺少 'username' 字段。 |
| 100006 | 'Username' 必须为字符串。 |
| 100009 | 用户名长度必须在 8 到 24 个字符之间。 |
| 100012 | 未找到密钥。 |
| 100013 | 未找到代理。 |
| 100014 | 未找到会员。 |
| 10100004 | "交易已执行,请通过 API 获取交易状态" |
| 100017 | 您进行了多次交易,请等待1分钟后重试。 |
用于检查存款和提款交易,通过 refId 获取相关交易信息
方法 : [Post]
路径 : {{domain}}/ext/getTransactionByRefId/{{prefix}}/{{agentUsername}}
内容类型 : application/json
{
"agentUsername": "{{agentUsername}}",
"key": "{{key}}",
"username": "{{agentUsername}}ninemb01",
"refId":"644cc2e6d4e63e12dfdf0cff",
"web": "{{whiteLabel}}"
}
| 键 | 类型 | 示例值 | 描述 |
|---|
| agentUsername | String | testag | 使用的代理 |
| key | String | tnyENKDWvOkBXpvm6UZVa | 代理的密钥 |
| username | String | testagninemb01 | 需要存款的用户名 |
| refId | String | 644cc2e6d4e63e12dfdf0cff | 用于检查存款或提款交易的 refId |
| web | String | sportbook101 | 使用的网站 |
{
"code": 0,
"data": {
"refId": "644b92dc4596495adf74adc7",
"isDp": true,
"user": "testninemb01",
"actionBy": "API",
"currency": "THB",
"action": "DEPOSIT",
"amount": 10,
"beforeCredit": 61,
"afterCredit": 71,
"ip": "164.53.32.74",
"date": "2023-04-28T09:33:16.484Z",
"transaction": "success"
},
"msg": "SUCCESS"
}
| 键名 | 类型 | 示例值 | 描述 |
|---|
| code | Number | 0 | API 响应代码。 |
| msg | String | success | 响应代码的描述。 |
| data | Object | { "refId": "644b92dc4596495adf74adc7", "isDp": true, "user": "testninemb01", "actionBy": "API", "currency": "THB", "action": "DEPOSIT", "amount": 10, "beforeCredit": 61, "afterCredit": 71, "ip": "164.53.32.74", "date": "2023-04-28T09:33:16.484Z", "transaction": "success" } | 存款或提款交易数据 |
| 值 | 信息 |
|---|
| 0 | 成功 |
| 100001 | 缺少 'agent Username' 字段。 |
| 100002 | 'agentUsername' 必须为字符串。 |
| 100003 | 缺少 'key' 字段。 |
| 100004 | 'Key' 必须为字符串。 |
| 100005 | 缺少 'username' 字段。 |
| 100006 | 'Username' 必须为字符串。 |
| 100009 | 用户名长度必须在 8 到 24 个字符之间。 |
| 100012 | 未找到密钥。 |
| 100013 | 未找到代理。 |
| 100014 | 未找到会员。 |
| 11002 | 转换 ObjectId 失败,值为 "644b92dc4596495adf74adc",路径 "_id",模型 "transferLogs" |
| 100017 | 您进行了多次交易,请等待1分钟后重试。 |