账户
获取账户详情
获取已认证用户的基本账户信息,包括公司名称、国家、KYC 状态和每月交易限额。
GET
/
v2
/
user
/
account
获取账户详情
curl --request GET \
--url https://api-test.velafi.com/v2/user/account \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/user/account"
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/user/account', 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/user/account")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"userId": 123,
"country": "<string>",
"companyName": "<string>",
"kycPassed": true,
"monthLimit": 123,
"monthUsed": 123
}
}GET /v2/user/account 端点返回与您的 API 密钥关联的核心账户信息——公司名称、注册国家、KYC 验证状态,以及每月交易限额和当前自然月内已使用的额度。使用此端点可以检查账户健康状况,或根据 KYC 状态或剩余月度额度在您的应用中控制功能的开放。
端点
| 属性 | 值 |
|---|---|
| 方法 | GET |
| 路径 | /v2/user/account |
| 认证 | 必需——X-BH-TOKEN 请求头 |
| 请求体 | 无 |
请求参数
此端点不接受查询参数,也没有请求体。唯一的要求是完成认证。响应字段
number
必填
数字响应码。
200 表示响应成功。string
必填
描述结果的简短消息。请求成功时返回
"SUCCESS"。object
必填
请求示例
curl --request GET \
--url https://api.velafi.com/v2/user/account \
--header "X-BH-TOKEN: your_token"
curl --request GET \
--url https://api-test.velafi.com/v2/user/account \
--header "X-BH-TOKEN: your_sandbox_token"
响应示例
{
"code": 200,
"msg": "SUCCESS",
"data": {
"userId": 1,
"country": "Argentina",
"companyName": "velafi",
"kycPassed": true,
"monthLimit": 250000.0,
"monthUsed": 0.0
}
}
kycPassed 字段反映您的账户是否已完成 KYC(了解您的客户)验证流程。如果 kycPassed 为 false,请在尝试创建正式订单之前联系 VelaFi 支持团队,或在商户门户中完成 KYC 步骤。在提交大额订单之前,请用
monthLimit 减去 monthUsed,确认当月剩余额度充足。如需提高每月限额,请联系 VelaFi 支持团队。⌘I
获取账户详情
curl --request GET \
--url https://api-test.velafi.com/v2/user/account \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/user/account"
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/user/account', 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/user/account")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"userId": 123,
"country": "<string>",
"companyName": "<string>",
"kycPassed": true,
"monthLimit": 123,
"monthUsed": 123
}
}
