GET
/v1/transactions
会员流水(游标分页)
Scope
balances:read
代会员调用 · 必带 x-on-behalf-of
会员视角的一条条流水,跨全部业务线(入金、提现、汇款、兑换、
转账、发卡、理财、扫码付)。不是账本分录 —— 一笔业务在这里
最多一行,账本那边可能是四条腿。
翻页只有一种形态:把上一页的 next_cursor 原样回传。
游标是不透明串,不要解析它、不要自己拼 —— 一旦你开始拼,
我方就再也改不了排序键了。解不开的游标按「从头开始」处理而不是报错。
⚠ amount_scale 必须一起用。金额是「该资产 scale 的定点整数」
的十进制串,而 scale 逐资产不同(USDT 6 位、BTC 8 位)。
按固定 6 位去解,第一个非 6 位资产上就错 100 倍且零报错。
⚠ type 与 status 是开放枚举,库里没有 CHECK 约束。
新业务线上线会加新值,而不会发版通知你。认不出的值请原样展示,
绝不要 default 成「处理中」或「成功」—— 那会把「人工审核中」
显示成已完成。要做分组就维护一张你认得的白名单,剩下的走兜底分支。
direction 只有两个值:in 钱进来、out 钱出去。
查询参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
limit |
integer | 可选 | 每页条数。缺省 20,上限 100;非数字或 ≤ 0 一律按 20 处理 (不报错,所以别指望用它来发现自己传错了)。 |
cursor |
string | 可选 | 上一页返回的 next_cursor 原样回传。首页不传。 |
请求头
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
x-on-behalf-of |
string | 必填 | 查谁的流水 |
响应
200OK
{
"data": [
{
"id": "txn_80231",
"type": "withdrawal",
"status": "locked",
"status_version": 1,
"direction": "out",
"asset": "USDT",
"amount": "200.000000",
"amount_scale": 6,
"occurred_at": "2026-08-12T09:31:02Z",
"created_at": "2026-08-12T09:31:02Z"
},
{
"id": "txn_80198",
"type": "deposit",
"status": "completed",
"status_version": 2,
"direction": "in",
"asset": "USDT",
"amount": "1500.000000",
"amount_scale": 6,
"occurred_at": "2026-08-12T08:04:55Z",
"created_at": "2026-08-12T08:04:57Z"
}
],
"next_cursor": "MjAyNi0wOC0xMlQwODowNDo1N1p8ODAxOTg",
"has_more": true
}400
member_context_required 没带 x-on-behalf-of404
member_not_found 会员不存在 / 属于别的商户 / 已停用
调用样例
curl -X GET 'https://api.zise.com/v1/transactions' \
-H 'authorization: Bearer $TOKEN' \
-H 'x-zise-merchant: $MERCHANT_ID' \
-H 'x-on-behalf-of: $MEMBER_ID'
const res = await fetch(
"https://api.zise.com/v1/transactions",
{
method: "GET",
headers: {
"authorization": "Bearer $TOKEN",
"x-zise-merchant": "MERCHANT_ID",
"x-on-behalf-of": "MEMBER_ID"
},
},
);
// 金额一律按字符串读,不要 JSON.parse 成 number
const data = await res.json();
import requests
res = requests.get(
"https://api.zise.com/v1/transactions",
headers={
"authorization": "Bearer $TOKEN",
"x-zise-merchant": "$MERCHANT_ID",
"x-on-behalf-of": "$MEMBER_ID"
},
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()