更新 Stripe 连接
POST
/web/v1/workspaces/{workspaceId}/stripe/connections/updateJWT更新已有的 Stripe 连接。仅请求体中提供的字段会被更新;省略的字段保持不变。
鉴权
Auth Chain: WEB Chain — 需要
Authorization: Bearer <jwt>需要workspace:manage权限。 以下请求头由系统自动注入(前端无需处理):X-PORTAL-ACCESS-CODE(Nginx),X-Request-Id(Gateway)
请求参数
| Name | Type | Required | In | Description |
|---|---|---|---|---|
workspaceId | string | Yes | path | 工作区业务 ID |
connectionBizId | string | Yes | body | 要更新的连接业务 ID |
connectionName | string | No | body | 更新后的显示名称 |
connectionDescription | string | No | body | 更新后的描述 |
stripeAccountId | string | No | body | 更新后的 Stripe 账户 ID |
apiKey | string | No | body | 更新后的 Stripe API 密钥 |
webhookSecret | string | No | body | 更新后的 Stripe Webhook 签名密钥 |
partnerEndpoint | string | No | body | 更新后的合作方回调端点 URL |
configJson | string | No | body | 更新后的配置 JSON 字符串 |
成功响应
成功200
{
"version": "1.3.0",
"timestamp": 1709337600000,
"success": true,
"code": "2000",
"message": "SUCCESS",
"data": {
"bizId": "sc_abc123",
"tenantBizId": "tn_xyz789",
"connectionName": "Updated Stripe Connection",
"connectionDescription": "Updated description",
"stripeAccountId": "acct_1234567890",
"partnerEndpoint": "https://partner.example.com/webhook",
"configJson": null,
"status": 1,
"statusName": "ACTIVE",
"createdAt": "2026-03-21T00:00:00Z",
"updatedAt": "2026-03-21T01:00:00Z"
}
}错误响应
Unauthorized401
{
"success": false,
"code": "4010",
"message": "Invalid or expired token"
}Not Found404
{
"success": false,
"code": "4040",
"message": "Stripe tenant connection not found"
}说明
- 仅提供的字段会被更新;省略的字段保留当前值。
- 敏感字段(
apiKey、webhookSecret)更新时会重新加密。 - 需要目标工作区的
workspace:manage权限。