Typescript (SDK)
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.platform.getStripeConnection({
organizationSlug: "my-app",
env: "test",
});from autumn_sdk import Autumn
autumn = Autumn(secret_key="am_sk_test...")
res = autumn.platform.get_stripe_connection(
organization_slug="my-app",
env="test",
)curl --request POST \
--url https://api.useautumn.com/v1/platform.get_stripe_connection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"organization_slug": "my-app",
"env": "test"
}
'{
"connected": true,
"account_id": "acct_example",
"connected_at": 1781113864000
}
Platform (Beta)
Get Stripe Connection
Read a managed organization’s Stripe OAuth connection, account ID, and authorization time in the selected environment.
POST
/
v1
/
platform.get_stripe_connection
Typescript (SDK)
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.platform.getStripeConnection({
organizationSlug: "my-app",
env: "test",
});from autumn_sdk import Autumn
autumn = Autumn(secret_key="am_sk_test...")
res = autumn.platform.get_stripe_connection(
organization_slug="my-app",
env="test",
)curl --request POST \
--url https://api.useautumn.com/v1/platform.get_stripe_connection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"organization_slug": "my-app",
"env": "test"
}
'{
"connected": true,
"account_id": "acct_example",
"connected_at": 1781113864000
}
Read a tenant’s Stripe OAuth connection before showing a Connect Stripe or Disconnect Stripe action in your application.
Authenticate with your master organization’s secret key, with
After the tenant returns from the Stripe OAuth flow, fetch this status to update your UI. Revocations made in Stripe are reflected after Autumn processes Stripe’s deauthorization webhook.
A slug that does not resolve to an organization created by your master organization returns
platform:read scope. Pass the tenant’s public organization_slug and an explicit env: test or live. You can only inspect organizations created by your master organization. The env field alone selects the connection: a test-mode or live-mode master key can read either environment’s connection.
Interpreting the response
connected: truemeans the tenant has a stored Stripe OAuth account connection in this environment.account_ididentifies that Stripe account.connected_atis the authorization time as a Unix timestamp in milliseconds. It can benullfor historical connections;nulldoes not mean disconnected.- An unconnected tenant returns
{"connected":false,"account_id":null,"connected_at":null}.
A default sandbox account, a separately configured Stripe secret key, or a direct account-ID connection through your own Stripe platform does not count as an Autumn OAuth connection. This endpoint is not a general check of whether the tenant can process payments.
400 with Organization with slug '<slug>' not found. A missing API key returns 401, and a key without platform:read returns 403.
To remove the OAuth connection, call Disconnect Stripe. Test and live connections are managed separately.
Body Parameters
Response
{
"connected": true,
"account_id": "acct_example",
"connected_at": 1781113864000
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
Response
200 - application/json
OK
Whether an OAuth connection is stored. Excludes platform-managed accounts, default sandbox accounts, and separate secret-key connections.
OAuth-connected Stripe account ID, or null when absent.
Connection timestamp in Unix milliseconds, or null for historical connections without a timestamp and when disconnected.