卡消费流水(游标分页)
代会员调用 · 必带
x-on-behalf-of
必须同时读 direction。 amount 是绝对值(库级 CHECK 保证非负),
只看金额的话一笔退款与一笔消费在你眼里一模一样。
另:卡消费不外发 webhook(每笔消费一条会把事件流变成纯粹的调用量
放大器,而事件体只带 id 与状态,你拿到也只能回查)。流水靠这个端点拉。
路径参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id |
string | 必填 | 卡 id |
查询参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
cursor |
string | 可选 | 上一页的 next_cursor(不透明串) |
limit |
integer | 可选 | 缺省 20,上限 100 |
请求头
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
x-on-behalf-of |
string | 必填 | 代哪个会员调用 |
响应
200OK(按发生时间倒序)
{
"data": [
{
"id": "ctx_2c9e4b10-77af-4d3a-8e51-b0d6c2f9a134",
"kind": "auth",
"status": "succeed",
"amount": "12990000",
"currency": "USD",
"scale": 6,
"merchant_name": "NETFLIX.COM",
"mcc": "4899",
"auth_code": "084217",
"occurred_at": "2026-08-09T10:55:02.000Z"
}
],
"next_cursor": null,
"has_more": false
}404
not_found 卡不存在,或不在这个会员/这个商户名下500
api_error —— 见上方警告,当前这是这个端点的实际行为请求
curl -X GET 'https://api.zise.com/v1/cards/{id}/transactions' \
-H 'x-auth-token: Bearer $TOKEN' \
-H 'x-on-behalf-of: $MEMBER_ID'const res = await fetch("https://api.zise.com/v1/cards/{id}/transactions", {
method: "GET",
headers: {
"x-auth-token": "Bearer $TOKEN",
"x-on-behalf-of": "$MEMBER_ID",
},
});
// 金额按字符串读,别让它变成 number
const data = await res.json();import requests
res = requests.get(
"https://api.zise.com/v1/cards/{id}/transactions",
headers={
"x-auth-token": "Bearer $TOKEN",
"x-on-behalf-of": "$MEMBER_ID",
},
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()req, _ := http.NewRequest("GET", "https://api.zise.com/v1/cards/{id}/transactions",
nil)
req.Header.Set("x-auth-token", "Bearer $TOKEN")
req.Header.Set("x-on-behalf-of", "$MEMBER_ID")
res, err := http.DefaultClient.Do(req)
// 金额字段用 string 接,不要 float64HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.zise.com/v1/cards/{id}/transactions"))
.header("x-auth-token", "Bearer $TOKEN")
.header("x-on-behalf-of", "$MEMBER_ID")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
// 金额字段用 String / BigDecimal,不要 double$ch = curl_init('https://api.zise.com/v1/cards/{id}/transactions');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-auth-token: Bearer $TOKEN',
'x-on-behalf-of: $MEMBER_ID',
],
]);
$res = curl_exec($ch);
// 金额用 bcmath / 字符串,不要 floatval
200
{
"data": [
{
"id": "ctx_2c9e4b10-77af-4d3a-8e51-b0d6c2f9a134",
"kind": "auth",
"status": "succeed",
"amount": "12990000",
"currency": "USD",
"scale": 6,
"merchant_name": "NETFLIX.COM",
"mcc": "4899",
"auth_code": "084217",
"occurred_at": "2026-08-09T10:55:02.000Z"
}
],
"next_cursor": null,
"has_more": false
}