Skip to main content
POST
Typescript (SDK)
Revoke Autumn’s Stripe OAuth access for a tenant and clear its connection in the selected environment. Authenticate with your master organization’s secret key, with platform:write scope. Pass the tenant’s public organization_slug and an explicit env: test or live. You can only disconnect organizations created by your master organization. The env field alone selects the connection: a test-mode or live-mode master key can manage either environment’s connection.

What disconnecting changes

On success, the endpoint returns {"success":true}. The tenant’s OAuth connection is cleared before the response, so Get Stripe Connection reports it as disconnected without waiting for webhook delivery. Calling the endpoint when the tenant is already disconnected also succeeds. The other environment’s connection, the default sandbox account, and any separately configured Stripe secret key are preserved. Stripe catalog mappings are cleared when no separate secret-key connection remains in the selected environment.
Disconnecting revokes OAuth access; it does not delete the Stripe account, cancel subscriptions, or delete customers. Operations that require the revoked connection will no longer work. Ask the tenant to confirm before disconnecting.
If the request fails, do not assume the connection is still active: Stripe revocation may already have completed. Retry the request and refresh the status. To reconnect, generate a new Stripe OAuth URL and have the tenant authorize again.

Safety checks

  • Direct account-ID connections: connections made through Update Connected Stripe Account belong to your own Stripe platform, not Autumn’s OAuth application. This endpoint rejects them with 400 rather than revoking the wrong authorization.
  • Shared OAuth authorization: if the same Stripe OAuth account is linked to another Autumn organization in this environment, the endpoint returns 409 without revoking access. Disconnecting that shared authorization could disrupt the other organization. Resolve the shared linkage before retrying.
  • Concurrent changes: if the tenant’s connection changes while the request runs, for example because the tenant reconnects, the endpoint returns 409 with Stripe connection changed during disconnect; reload and retry. Fetch the current status before retrying.
  • Unknown organizations: a slug that does not resolve to an organization created by your master organization returns 400 with Organization with slug '<slug>' not found, including slugs owned by other platforms.
  • Permissions: a missing API key returns 401; a key without platform:write returns 403. None of these responses changes the connection.

Body Parameters

Response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2.4.0
required

Body

application/json
organization_slug
string
required

Public tenant organization slug, without the master organization suffix.

Minimum string length: 1
env
enum<string>
required

Stripe connection environment to inspect or disconnect.

Available options:
test,
live

Response

200 - application/json

OK

success
any
required