提款
此接口对YabandPay的钱包余额进行提款
[!TIP|style:flat]
1、提款金额不能大于可支配余额(usable)
2、此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 | payout | 必填 |
amount | String | 提款金额,2位小数,例如19.99 | 必填 |
currency | String | 货币代码,ISO 4217,例如EUR,CHF | 必填 |
reference | String | 备注 | 必填 |
notify_url | String | 异步通知地址 | 必填 |
nonce_string | String | 随机字符串,不长于32位 | 必填 |
签名示例:
拼接为URL方式并排序后的字符串
"amount=100.01&command=payout¤cy=EUR&method=v3.MerchantBalance&nonce_string=2yx20x4c6dswedikxs¬ify_url=https://www.yabandpay.com/notify&reference=456789&time=1708482257&user=036870"
得到的 stringA 使用 secret_key做签名
得到的签名如下:
"f68fa2e922292e4fc7e4151a63ca45c66a32d4d0562795d77abe6c52d4fe7c60"
提交示例:
{
"user": "036870",
"sign": "f68fa2e922292e4fc7e4151a63ca45c66a32d4d0562795d77abe6c52d4fe7c60",
"method": "v3.MerchantBalance",
"time": 1708482257,
"data": {
"command": "payout",
"nonce_string": "2yx20x4c6dswedikxs",
"amount": 100.01,
"currency": "EUR",
"reference": "456789",
"notify_url": "https://www.yabandpay.com/notify"
}
}
返回示例:
{
"status": true,
"code": "200",
"data": {
"user": "036870",
"time": 1708482257,
"gateway_name": "YabandPay",
"payout_id": "0594bf99-fce7-3784-28f7-e8e76ad01989",
"currency": "EUR",
"amount": "100.01",
"reference": "456789",
"notify_url": "https://www.yabandpay.com/notify",
"state": "awaiting approval"
},
"message": ""
}
更多信息:
返回参数说明如下:
参数 | 类型 | 描述 |
---|---|---|
user | String | 超级管理员账号的UID |
time | String | 当前时间戳 |
gateway_name | String | 钱包机构名称 |
payout_id | String | payout订单号 |
currency | String | 货币代码,ISO 4217 |
amount | String | 提款金额 |
reference | String | 备注 |
notify_url | String | 异步通知地址 |
state | String | 订单状态。目前有6种状态: awaiting approval , pending , failed , completed , declined , cancelled |