Skip to content

查询扣费记录

接口信息

GET /subscription/billing/list

请求参数

参数名类型必填参与签名说明
subscriptionCodeString订阅编号
merchantIdString商户号
statusString扣费状态:PENDING / SUCCESS / FAILED / CANCELLED
pageNumInteger页码(默认 1)
pageSizeInteger每页数量(默认 10,最大 100)
signString签名

响应参数

字段类型说明
data.totalInteger总记录数
data.pageNumInteger当前页码
data.pageSizeInteger每页数量
data.recordsArray扣费记录列表

records 数组元素

字段类型说明
recordIdString扣费记录 ID
subscriptionCodeString订阅编号
billingTypeString扣费类型:INITIAL(首次)/ RENEW(续费)/ RETRY(重试)
amountBigDecimal扣费金额
currencyString货币
scheduledTimeString计划扣费时间
actualTimeString实际扣费时间
statusString状态:PENDING / SUCCESS / FAILED / CANCELLED
transactionOrderIdString交易订单 ID
failReasonString失败原因
retryCountInteger重试次数
createTimeString创建时间

请求示例

json
{
  "subscriptionCode": "SC_001",
  "merchantId": "MERCHANT_001",
  "pageNum": 1,
  "pageSize": 10,
  "sign": "calculated_signature"
}

响应示例

json
{
  "rtn_code": "0000",
  "success": true,
  "data": {
    "total": 3,
    "pageNum": 1,
    "pageSize": 10,
    "records": [
      {
        "recordId": "BR_001",
        "subscriptionCode": "SC_001",
        "billingType": "RENEW",
        "amount": 9.99,
        "currency": "USD",
        "scheduledTime": "2024-11-21 10:00:00",
        "actualTime": "2024-11-21 10:00:05",
        "status": "SUCCESS",
        "transactionOrderId": "TXN_123456",
        "retryCount": 0,
        "createTime": "2024-11-21 10:00:00"
      }
    ]
  }
}

Codrimpay