余额查询
此接口查询YabandPay的钱包余额
[!TIP|style:flat]
此API仅限商户超级管理员账号调用,操作员或收银员账号无权调用。
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
参数 | 类型 | 描述 | 是否必填 | |
---|---|---|---|---|
user | String | 超级管理员账号的UID | 必填 | |
sign | String | 签名 | 必填 | |
method | String | v3.MerchantBalance | 必填 | |
time | Long | 时间戳 | 必填 |
- 参数
参数 | 类型 | 描述 | 是否必填 |
---|---|---|---|
command | String | getBalance | 必填 |
currency | String | 货币代码,ISO 4217,例如EUR,CHF | 必填 |
nonce_string | String | 随机字符串,不长于32位 | 必填 |
签名示例:
拼接为URL方式并排序后的字符串
"command=getBalance¤cy=EUR&method=v3.MerchantBalance&nonce_string=tw5be5b7sry5prm96s&time=1708422208&user=036870"
得到的 stringA 使用 secret_key做签名
得到的签名如下:
"9abdb20d59573ded6b415adf871aeddcb7896ad954e7828b39d9f14b65a3464a"
提交示例:
{
"user": "036870",
"sign": "9abdb20d59573ded6b415adf871aeddcb7896ad954e7828b39d9f14b65a3464a",
"method": "v3.MerchantBalance",
"time": 1708422208,
"data": {
"command": "getBalance",
"nonce_string": "tw5be5b7sry5prm96s",
"currency": "EUR"
}
}
返回示例:
{
"status": true,
"code": "200",
"data": {
"user": "036870",
"time": 1708422208,
"gateway_name": "YabandPay",
"wallet_id": "WA156227511825",
"currency": "EUR",
"available": "9999788.98",
"reserve": "200.00",
"usable": "9999988.98",
"deposit": "20.00"
},
"message": ""
}
更多信息:
返回参数说明如下:
参数 | 类型 | 描述 |
---|---|---|
user | String | 超级管理员账号的UID |
time | String | 当前时间戳 |
gateway_name | String | 机构名称 |
wallet_id | String | 钱包ID |
currency | String | 货币代码,ISO 4217 |
available | String | 可用余额 |
reserve | String | 储备金余额 |
usable | String | 可支配金额,其值等于vailable - reserve |
deposit | String | 冻结余额 |