创建账单门户会话

OpenAPI 契约

方法
POST
路径
/api/v1/billing/portal
认证
jwtBearer (bearer)
响应状态
200 400 401 403 429 500
请求与响应 Schema
JSON
{
  "requestBody": {},
  "responses": {
    "200": {
      "description": "Billing portal 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/portal 仅限 JWT。它仅返回 { "redirectUrl": "..." },即当前认证用户的托管 Stripe Billing Portal 会话 URL。它本身不会变更订阅或支付方式。

可用性:已按源码/配置核实。 此 URL 需要配置支付服务商;未创建真实门户会话来验证本页。支付服务商 Webhook 有意不属于公开 API Reference。

http
POST /api/v1/billing/portal
Authorization: Bearer <access token>