Typescript (SDK)
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.platform.disconnectStripe({
organizationSlug: "my-app",
env: "test",
});from autumn_sdk import Autumn
autumn = Autumn(secret_key="am_sk_test...")
res = autumn.platform.disconnect_stripe(
organization_slug="my-app",
env="test",
)curl --request POST \
--url https://api.useautumn.com/v1/platform.disconnect_stripe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"organization_slug": "my-app",
"env": "test"
}
'{
"success": true
}
Platform (Beta)
Disconnect Stripe
Revoke Autumn’s Stripe OAuth access for a managed organization in the selected environment. Does not delete the Stripe account or cancel subscriptions.
POST
/
v1
/
platform.disconnect_stripe
Typescript (SDK)
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.platform.disconnectStripe({
organizationSlug: "my-app",
env: "test",
});from autumn_sdk import Autumn
autumn = Autumn(secret_key="am_sk_test...")
res = autumn.platform.disconnect_stripe(
organization_slug="my-app",
env="test",
)curl --request POST \
--url https://api.useautumn.com/v1/platform.disconnect_stripe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"organization_slug": "my-app",
"env": "test"
}
'{
"success": true
}
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
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.
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.
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
400rather 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
409without 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
409withStripe 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
400withOrganization with slug '<slug>' not found, including slugs owned by other platforms. - Permissions: a missing API key returns
401; a key withoutplatform:writereturns403. None of these responses changes the connection.
Body Parameters
Response
{
"success": true
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
Response
200 - application/json
OK