创建充值结账会话
OpenAPI 契约
- 方法
- POST
- 路径
/api/v1/billing/checkout/topup- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 429 500
请求与响应 Schema
JSON
{
"requestBody": {
"application/json": {
"$ref": "#/components/schemas/TopupRequest"
}
},
"responses": {
"200": {
"description": "Checkout URL",
"content": {
"application/json": {}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}POST /api/v1/billing/checkout/topup 仅限 JWT。发送受支持的非空 sku;可选 Idempotency-Key 会转发给 Stripe。响应仅为 { "redirectUrl": "..." },即托管 Checkout 会话 URL。它本身不会向账户计入 NCU。
可用性:已按源码/配置核实。 已支付的 Stripe Checkout 完成会由支付服务商 Webhook 验证并应用;该 Webhook 有意不属于公开 API Reference。未执行真实付款来验证本页。
http
POST /api/v1/billing/checkout/topup
Authorization: Bearer <access token>
Content-Type: application/json
Idempotency-Key: <unique key>
{"sku":"TEN_K"}