外观
储值流水
GET /members/{memberId}/wallet/transactions
| 权限范围 | 幂等 | operationId |
|---|---|---|
assets:read | 只读 | Assets_walletTransactions |
按时间倒序,游标分页。type 为流水业务类型(如 BALANCE_RECHARGE、ORDER_CONSUME、RECHARGE_REFUND),遇到不认识的值请容忍。
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
memberId | 路径 | string | 是 | 会员 ID(mb_…) |
cursor | 查询 | string | 分页游标:第一页不传,之后原样传上一页返回的 nextCursor | |
limit | 查询 | integer | 每页条数,1~100,默认 20 |
示例
js
const res = await client.get("/members/mb_1sKVu55B92JYxO8sHKyX1Cd/wallet/transactions");http
GET /open/v1/members/mb_1sKVu55B92JYxO8sHKyX1Cd/wallet/transactions HTTP/1.1
Host: api.sybb.pw
Authorization: SY-HMAC-SHA256 Credential=ak_…, Timestamp=1796035200, Nonce=…, Signature=…响应 200:
json
{
"items": [
{
"transactionId": "txn_1GX2Il949CBXuLxOuAZLPkA",
"type": "string",
"typeLabel": "余额充值",
"amountCents": 10000,
"balanceBeforeCents": 10000,
"balanceAfterCents": 10000,
"subject": "订单消费",
"description": "说明文字",
"orderId": "ord_1swjSmmMNEanSXcuroC364o",
"createdAt": "2026-11-30T20:15:00+08:00"
}
],
"nextCursor": "string"
}响应
WalletTxnView
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
transactionId | string | 储值流水 ID(txn_…) | |
type | string | 业务类型码(稳定,可编程判断):BALANCE_RECHARGE 充值 / ORDER_CONSUME 订单消费 / ORDER_REFUND 订单退款 / RECHARGE_REFUND 充值退款 / SYSTEM_REWARD 赠送 / AFTERSALE_GIFT 售后赠金 / ACTIVITY_REBATE 活动返利 / INCOME_REVERSAL 冲销 / MEMBERSHIP_PURCHASE 会员购买 等 | |
typeLabel | string | 业务类型中文名 | |
amountCents | integer | 是 | 变动金额(分),增加为正、减少为负 |
balanceBeforeCents | integer | 是 | 金额(分) |
balanceAfterCents | integer | 是 | 金额(分) |
subject | string | 流水标题 | |
description | string | 说明 | |
orderId | string | 关联订单(没有为 null)(ord_…) | |
createdAt | string | 时间(RFC 3339) |
错误
| HTTP | 错误码 | 含义 |
|---|---|---|
| 404 | NOT_FOUND | 资源不存在或不属于本店 |
签名、权限、限流等通用错误见错误处理。