Create Stripe Connection
POST
/web/v1/workspaces/{workspaceId}/stripe/connectionsJWTCreates a new Stripe connection for the current workspace. The connection stores the Stripe account credentials and webhook configuration needed for payment processing.
Authentication
Auth Chain: WEB Chain — requires
Authorization: Bearer <jwt>Requiresworkspace:managepermission. These headers are injected by the system (frontend does nothing):X-PORTAL-ACCESS-CODE(Nginx),X-Request-Id(Gateway)
Request Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
workspaceId | string | Yes | path | Workspace business ID |
connectionName | string | Yes | body | Display name for the connection |
connectionDescription | string | No | body | Optional description of the connection |
stripeAccountId | string | Yes | body | Stripe account ID (e.g. `acct_xxx`) |
apiKey | string | Yes | body | Stripe API secret key |
webhookSecret | string | Yes | body | Stripe webhook signing secret (e.g. `whsec_xxx`) |
partnerEndpoint | string | Yes | body | Partner callback endpoint URL |
configJson | string | No | body | Additional configuration as a JSON string |
Success Response
Created201
{
"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": 1,
"statusName": "ACTIVE",
"createdAt": "2026-03-21T00:00:00Z",
"updatedAt": "2026-03-21T00:00:00Z"
}
}Error Responses
Unauthorized401
{
"success": false,
"code": "4010",
"message": "Invalid or expired token"
}Forbidden403
{
"success": false,
"code": "4030",
"message": "Insufficient permissions"
}Notes
- The
apiKeyandwebhookSecretfields are stored encrypted and are never returned in responses. - Requires the
workspace:managepermission on the target workspace. - The connection is created in an active state by default.