外观
按外部收款单号查充值
GET /recharges
| 权限范围 | 幂等 | operationId |
|---|---|---|
assets:read | 只读 | Recharges_findRecharge |
按 channel + externalPaymentId 查本应用发起的充值,没有返回 404。
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
channel | 查询 | string | 是 | 外部渠道 |
externalPaymentId | 查询 | string | 是 | 外部平台收款单号 |
示例
js
const res = await client.get("/recharges");http
GET /open/v1/recharges HTTP/1.1
Host: api.sybb.pw
Authorization: SY-HMAC-SHA256 Credential=ak_…, Timestamp=1796035200, Nonce=…, Signature=…响应 200:
json
{
"rechargeId": "rc_1qBBpfxbnLlLiHX5I50ot4F",
"memberId": "mb_1sKVu55B92JYxO8sHKyX1Cd",
"amountCents": 10000,
"refundedCents": 0,
"refundableCents": 10000,
"status": "succeeded",
"channel": "taobao",
"externalPaymentId": "TB-20261130-0001",
"createdAt": "2026-11-30T20:15:00+08:00"
}响应
RechargeView
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
rechargeId | string | 充值 ID(rc_…) | |
memberId | string | 会员 ID(mb_…) | |
amountCents | integer | 是 | 金额(分) |
refundedCents | integer | 是 | 金额(分) |
refundableCents | integer | 是 | 金额(分) |
status | string | succeeded 已到账 / partially_refunded 部分退款 / refunded 已全额退款 | |
channel | string | 外部渠道 | |
externalPaymentId | string | 外部平台收款单号 | |
createdAt | string | 时间(RFC 3339) |
错误
| HTTP | 错误码 | 含义 |
|---|---|---|
| 404 | NOT_FOUND | 资源不存在或不属于本店 |
签名、权限、限流等通用错误见错误处理。