fix: serialize Stripe checkout provisioning

This commit is contained in:
237899745
2026-07-26 03:07:30 +08:00
parent 03d0e43d4d
commit 08000cc16e
8 changed files with 805 additions and 197 deletions

View File

@@ -592,7 +592,6 @@ Authorization: Bearer <token>
POST /billing/checkout
Authorization: Bearer <token>
Content-Type: application/json
Idempotency-Key: <key>
```
请求体:
@@ -605,6 +604,8 @@ Idempotency-Key: <key>
{ "success": true, "data": { "checkout_url": "https://pay.example.com/..." } }
```
Checkout 的 Customer 与 Session 幂等键由服务端按用户和待支付记录生成,客户端无需也不能决定该幂等边界。同一用户同一时间只允许一个未过期的 Checkout已有未取消 Stripe 订阅时返回 `409 IDEMPOTENCY_CONFLICT`,套餐调整必须使用 Portal。
### 9.5 打开客户 Portal管理支付方式/取消订阅)
```http
POST /billing/portal