账户流水
账户流水 API 用于查询商户账户维度的余额变动记录,支持按时间范围分页查询,也支持按业务服务 ID 批量查询关联记录。
接入准备
调用账户服务前,请先完成 账户服务接入准备。
交易记录查询
交易记录查询 API 返回指定币种在固定时间范围内的账户流水。
查询约束
endTime不能早于beginTime。- 查询时间范围不能超过
31天。 size由服务端控制,请使用current翻页。
请求参数
| Parameter | Type | Length | Required | Signed | Description |
|---|---|---|---|---|---|
requestId | String | / | Yes | No | Unique request ID for idempotency and request tracing. |
requestTime | Long | / | Yes | No | Request timestamp in milliseconds. The timestamp must be within 10 minutes of the server time. |
currency | String | / | Yes | No | Currency code, for example |
beginTime | String | / | Yes | No | Query start time in UTC ISO-8601 format, for example |
endTime | String | / | Yes | No | Query end time in UTC ISO-8601 format, for example |
businessType | String | / | No | No | Business type filter. If omitted, all supported business types are returned. |
current | Long | / | No | No | Current page number. Defaults to |
响应
| Name | Type | Description |
|---|---|---|
code | String | Response code. |
message | String | Response message. |
data | Object | Paginated account transaction records. |
└total | Long | Total number of records. |
└size | Long | Page size returned by the server. |
└current | Long | Current page number. |
└records | Array | Account transaction record list. |
└currency | String | Currency code. |
└acntTxnId | Long | Account transaction ID. |
└serviceId | Long | Business service ID. |
└balanceUpdDate | String | Balance update time in UTC ISO-8601 format. |
└amount | String | Signed transaction amount. |
└remark | String | Transaction remark. |
└businessType | String | Business type. |
API 使用示例
{
"requestId": "REQ-TRX-20260423-0001",
"requestTime": 1776931200000,
"currency": "USD",
"beginTime": "2026-04-01T00:00:00Z",
"endTime": "2026-04-23T23:59:59Z",
"current": 1
}2
3
4
5
6
7
8
{
"code": "200",
"message": "success",
"data": {
"total": 50,
"size": 20,
"current": 1,
"records": [
{
"currency": "USD",
"acntTxnId": 10001,
"serviceId": 20001,
"balanceUpdDate": "2026-04-20T10:30:00Z",
"amount": "-100.00",
"remark": "Payout to bank account",
"businessType": "PAYOUT"
},
{
"currency": "USD",
"acntTxnId": 10002,
"serviceId": 20002,
"balanceUpdDate": "2026-04-19T08:15:00Z",
"amount": "500.00",
"remark": "Payment received",
"businessType": "PAYMENT"
}
]
}
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
按业务 ID 查询交易记录
按业务 ID 查询交易记录 API 可根据业务服务 ID 批量查询关联账户流水。
查询约束
serviceIds不能为空。serviceIds最多包含100个元素。
请求参数
| Parameter | Type | Length | Required | Signed | Description |
|---|---|---|---|---|---|
requestId | String | / | Yes | No | Unique request ID for idempotency and request tracing. |
requestTime | Long | / | Yes | No | Request timestamp in milliseconds. The timestamp must be within 10 minutes of the server time. |
serviceIds | Array | 100 | Yes | No | Business service ID list used to locate related account transaction records. Maximum 100 IDs. |
响应
| Name | Type | Description |
|---|---|---|
code | String | Response code. |
message | String | Response message. |
data | Array | Account transaction record list. |
└currency | String | Currency code. |
└acntTxnId | Long | Account transaction ID. |
└serviceId | Long | Business service ID. |
└balanceUpdDate | String | Balance update time in UTC ISO-8601 format. |
└amount | String | Signed transaction amount. |
└remark | String | Transaction remark. |
└businessType | String | Business type. |
API 使用示例
{
"requestId": "REQ-TRX-20260423-0002",
"requestTime": 1776931200000,
"serviceIds": [20001, 20002, 20003]
}2
3
4
5
{
"code": "200",
"message": "success",
"data": [
{
"currency": "USD",
"acntTxnId": 10001,
"serviceId": 20001,
"balanceUpdDate": "2026-04-20T10:30:00Z",
"amount": "-100.00",
"remark": "Payout to bank account",
"businessType": "PAYOUT"
},
{
"currency": "USD",
"acntTxnId": 10002,
"serviceId": 20002,
"balanceUpdDate": "2026-04-19T08:15:00Z",
"amount": "500.00",
"remark": "Payment received",
"businessType": "PAYMENT"
}
]
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
实施建议
- 使用固定时间窗口分页查询,避免一次性拉取过大范围数据。
- 保存
serviceId与业务订单、付款或出款记录之间的映射,便于按业务维度对账。 - 对
amount按正负号处理资金方向,不要只按businessType推断。