Skip to content

暂停 Stripe 连接

POST/web/v1/workspaces/{workspaceId}/stripe/connections/{connectionBizId}/suspendJWT

暂停活跃的 Stripe 连接,临时禁止通过该连接进行支付处理和 Webhook 投递。

鉴权

Auth Chain: WEB Chain — 需要 Authorization: Bearer <jwt> 需要 workspace:manage 权限。 以下请求头由系统自动注入(前端无需处理): X-PORTAL-ACCESS-CODE (Nginx), X-Request-Id (Gateway)

请求参数

NameTypeRequiredInDescription
workspaceIdstringYespath工作区业务 ID
connectionBizIdstringYespath要暂停的连接业务 ID

成功响应

成功200
{
  "version": "1.3.0",
  "timestamp": 1709337600000,
  "success": true,
  "code": "2000",
  "message": "SUCCESS",
  "data": {
    "bizId": "sc_abc123",
    "tenantBizId": "tn_xyz789",
    "connectionName": "Production Stripe",
    "connectionDescription": "Main production connection",
    "stripeAccountId": "acct_1234567890",
    "partnerEndpoint": "https://partner.example.com/webhook",
    "configJson": null,
    "status": 2,
    "statusName": "SUSPENDED",
    "createdAt": "2026-03-21T00:00:00Z",
    "updatedAt": "2026-03-21T02:00:00Z"
  }
}

错误响应

Unauthorized401
{
  "success": false,
  "code": "4010",
  "message": "Invalid or expired token"
}
Not Found404
{
  "success": false,
  "code": "4040",
  "message": "Stripe tenant connection not found"
}

说明

  • 暂停连接不会删除已存储的凭证;凭证会保留以备重新激活使用。
  • 暂停的连接可通过激活 Stripe 连接接口重新激活。
  • 需要目标工作区的 workspace:manage 权限。

内部文档