商户
获取商户账户列表
获取商户法币支付账户的分页列表,包括其激活状态、当前余额和每月交易限额。
GET
/
v2
/
merchant
/
accounts
获取商户账户列表
curl --request GET \
--url https://api-test.velafi.com/v2/merchant/accounts \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/merchant/accounts"
headers = {"X-BH-TOKEN": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-BH-TOKEN': '<api-key>'}};
fetch('https://api-test.velafi.com/v2/merchant/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api-test.velafi.com/v2/merchant/accounts")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"currentPage": 123,
"size": 123,
"total": 123,
"record": [
{
"merchantId": 123,
"fiat": "<string>",
"balance": "<string>",
"status": 123,
"paymentId": 123,
"paymentMethodName": "<string>",
"monthBuyLimit": "<string>",
"monthBuyUsed": "<string>",
"monthSellLimit": "<string>",
"monthSellUsed": "<string>",
"failReason": "<string>",
"createTime": "<string>",
"updateTime": "<string>"
}
]
}
}使用此端点查看与一个或多个商户关联的法币支付账户。每条账户记录都会显示币种、当前余额、渠道详情,以及每月买入和卖出限额及其使用情况。您可以按商户 ID、币种或激活状态进行筛选以缩小结果范围。
所有请求都必须包含
X-BH-TOKEN 请求头,其中包含通过 GET /v2/token/generate 获取的业务令牌。端点
GET https://api.velafi.com/v2/merchant/accounts
查询参数
响应字段
显示 data 字段
显示 data 字段
显示 record 项字段
显示 record 项字段
账户状态:
0 = 已初始化,1 = 待处理,2 = 已激活,3 = 失败,4 = 不完整。已关闭或已停用的渠道也会报告为 1。记录按渠道配置列出,因此仍处于待处理或不完整状态的渠道可能尚未列出。示例
cURL
curl -G https://api.velafi.com/v2/merchant/accounts \
-H "X-BH-TOKEN: YOUR_TOKEN" \
--data-urlencode "merchantId=100001" \
--data-urlencode "status=2" \
--data-urlencode "pageSize=10"
Response
{
"code": 200,
"msg": "SUCCESS",
"data": {
"currentPage": 1,
"size": 10,
"total": 2,
"record": [
{
"merchantId": 1,
"fiat": "MXN",
"balance": "100.00",
"status": 2,
"paymentId": 105,
"paymentMethodName": "Automated Bank Transfer(Mexico)",
"monthBuyLimit": "50000",
"monthBuyUsed": "2000.00",
"monthSellLimit": "50000",
"monthSellUsed": "0",
"failReason": "",
"createTime": "1737452292000",
"updateTime": "1737452344000"
}
]
}
}
⌘I
获取商户账户列表
curl --request GET \
--url https://api-test.velafi.com/v2/merchant/accounts \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/merchant/accounts"
headers = {"X-BH-TOKEN": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-BH-TOKEN': '<api-key>'}};
fetch('https://api-test.velafi.com/v2/merchant/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api-test.velafi.com/v2/merchant/accounts")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"currentPage": 123,
"size": 123,
"total": 123,
"record": [
{
"merchantId": 123,
"fiat": "<string>",
"balance": "<string>",
"status": 123,
"paymentId": 123,
"paymentMethodName": "<string>",
"monthBuyLimit": "<string>",
"monthBuyUsed": "<string>",
"monthSellLimit": "<string>",
"monthSellUsed": "<string>",
"failReason": "<string>",
"createTime": "<string>",
"updateTime": "<string>"
}
]
}
}