商户
获取资金记录
列出商户待处理资金 (Pending Fund) 账户的所有活动,包括存款、提现、加密货币购买、退款和内部转账。
GET
/
v2
/
merchant
/
funding
/
records
获取资金记录
curl --request GET \
--url https://api-test.velafi.com/v2/merchant/funding/records \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/merchant/funding/records"
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/funding/records', 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/funding/records")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"currentPage": 123,
"size": 123,
"total": 123,
"record": [
{
"id": "<string>",
"txId": "<string>",
"clientId": "<string>",
"extId": "<string>",
"merchantId": 123,
"merchantName": "<string>",
"fiat": "<string>",
"totalAmount": 123,
"amount": 123,
"fee": 123,
"refundedAmount": 123,
"paymentId": 123,
"userPaymentId": 123,
"type": "<string>",
"status": 123,
"webhookInfo": "<string>",
"completedTime": "<string>",
"refundedTime": "<string>",
"createTime": "<string>",
"updateTime": "<string>",
"failCode": 123,
"failReason": "<string>"
}
]
}
}使用此端点获取商户待处理资金 (Pending Fund) 账户的完整活动日志。每一笔入账和出账——无论是来自入账电汇、加密货币购买、资金提取(提现)、退款,还是商户之间的内部转账——都会记录在此。可按类型、状态、日期范围或
clientId 进行筛选,以生成对账报告或调查特定交易。
所有请求都必须包含
X-BH-TOKEN 请求头,其中包含通过 GET /v2/token/generate 获取的业务令牌。端点
GET https://api.velafi.com/v2/merchant/funding/records
查询参数
按交易类型筛选。可接受的值:
ALL— 所有类型(默认)DEPOSIT— 存入账户的入账资金WITHDRAW— 从账户提取(提现)的资金BUY_CRYPTO— 用于购买加密货币的资金REFUND— 退回至账户的退款TRANSFER_IN— 从其他商户收到的资金TRANSFER_OUT— 转给其他商户的资金
响应字段
显示 data 字段
显示 data 字段
显示 record 项字段
显示 record 项字段
示例
cURL
curl -G https://api.velafi.com/v2/merchant/funding/records \
-H "X-BH-TOKEN: YOUR_TOKEN" \
--data-urlencode "merchantId=3" \
--data-urlencode "fiat=MXN" \
--data-urlencode "type=DEPOSIT" \
--data-urlencode "status=2" \
--data-urlencode "pageSize=10"
Response
{
"code": 200,
"msg": "SUCCESS",
"data": {
"currentPage": 1,
"size": 10,
"total": 100,
"record": [
{
"id": "1123123123",
"txId": "1123123123",
"merchantId": 3,
"merchantName": "Example Merchant",
"fiat": "MXN",
"totalAmount": 22.00,
"amount": 20.00,
"fee": 2.00,
"refundedAmount": 0,
"paymentId": 63,
"userPaymentId": 91,
"type": "DEPOSIT",
"status": 2,
"webhookInfo": "{}",
"completedTime": "1737452344000",
"refundedTime": null,
"createTime": "1737452292000",
"updateTime": "1737452344000",
"failCode": "",
"failReason": ""
}
]
}
}
⌘I
获取资金记录
curl --request GET \
--url https://api-test.velafi.com/v2/merchant/funding/records \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/merchant/funding/records"
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/funding/records', 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/funding/records")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"currentPage": 123,
"size": 123,
"total": 123,
"record": [
{
"id": "<string>",
"txId": "<string>",
"clientId": "<string>",
"extId": "<string>",
"merchantId": 123,
"merchantName": "<string>",
"fiat": "<string>",
"totalAmount": 123,
"amount": 123,
"fee": 123,
"refundedAmount": 123,
"paymentId": 123,
"userPaymentId": 123,
"type": "<string>",
"status": 123,
"webhookInfo": "<string>",
"completedTime": "<string>",
"refundedTime": "<string>",
"createTime": "<string>",
"updateTime": "<string>",
"failCode": 123,
"failReason": "<string>"
}
]
}
}