{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"required": [
"items"
],
"properties": {
"page": {
"type": "integer",
"minimum": 1
},
"page_size": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"total": {
"type": "integer",
"minimum": 0
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"user_id",
"amount",
"money",
"trade_no",
"payment_method",
"status",
"create_time",
"credit_status"
],
"properties": {
"id": {
"type": "integer",
"description": "订单记录自增 ID"
},
"user_id": {
"type": "integer",
"description": "用户 ID"
},
"amount": {
"type": "integer",
"description": "购买数量(整数 quota-USD 单位)"
},
"money": {
"type": "number",
"description": "旧原生业务金额字段(不能解释为 Stripe 实付金额)"
},
"trade_no": {
"type": "string",
"description": "充值交易单号"
},
"payment_method": {
"type": "string",
"description": "支付方式(如 stripe)"
},
"payment_provider": {
"type": "string",
"description": "支付提供方标识"
},
"status": {
"type": "string",
"enum": [
"pending",
"success",
"failed",
"expired"
],
"description": "原生订单状态:待支付、完成、失败、过期;与 credit_status 分开判断"
},
"create_time": {
"type": "integer",
"description": "创建时间(Unix 秒)"
},
"complete_time": {
"type": "integer",
"description": "完成时间(Unix 秒)"
},
"expected_quota": {
"type": [
"integer",
"null"
],
"description": "创建时锁定的预计 quota(1 USD = 1000000 quota;旧订单可能为 null)"
},
"expected_pay_usd_cents": {
"type": [
"string",
"null"
],
"description": "创建时 Stripe 原价美元分字符串(旧订单可能为 null;非优惠后实付)"
},
"expected_credits": {
"type": [
"string",
"null"
],
"description": "预计到账积分(四位小数字符串,1 USD = 100 积分;旧订单可能为 null)"
},
"credited_quota": {
"type": [
"integer",
"null"
],
"description": "实际钱包入账事务写下的 native quota(未入账或无历史证据时为 null)"
},
"credited_credits": {
"type": [
"string",
"null"
],
"description": "实际到账积分(四位小数字符串;未成功为 0.0000,无历史证据的成功订单为 null,绝不补零)"
},
"credit_status": {
"type": "string",
"enum": [
"none",
"credited",
"unknown"
],
"description": "到账状态:none 未入账,credited 已有入账证据,unknown 历史成功订单缺少明细证据"
}
},
"additionalProperties": true
}
}
},
"additionalProperties": true
}
}
}
}
}
}