> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useautumn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Stripe Connection

> Read a managed organization's Stripe OAuth connection, account ID, and authorization time in the selected environment.

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 `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: true` means the tenant has a stored Stripe OAuth account connection in this environment. `account_id` identifies that Stripe account.
* `connected_at` is the authorization time as a Unix timestamp in **milliseconds**. It can be `null` for historical connections; `null` does not mean disconnected.
* An unconnected tenant returns `{"connected":false,"account_id":null,"connected_at":null}`.

> [!NOTE]
>
> 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.

After the tenant returns from the [Stripe OAuth flow](https://docs.useautumn.com/api-reference/platform/oauth-url.md), 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 `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](https://docs.useautumn.com/api-reference/platform/disconnectStripe.md). Test and live connections are managed separately.

### Body Parameters

Public tenant organization slug, without the master organization suffix.

Stripe connection environment to inspect or disconnect.

### Response

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.

```json 200 theme={null}
{
  "connected": true,
  "account_id": "acct_example",
  "connected_at": 1781113864000
}
```


## OpenAPI

````yaml openapi POST /v1/platform.get_stripe_connection
openapi: 3.1.0
info:
  title: Autumn API
  version: 2.6.0
servers:
  - url: https://api.useautumn.com
    description: Production server
security:
  - secretKey: []
paths:
  /v1/platform.get_stripe_connection:
    post:
      tags:
        - platform
      description: >-
        Read a managed organization's Stripe OAuth connection, account ID, and
        authorization time in the selected environment.
      operationId: getStripeConnection
      parameters:
        - name: x-api-version
          in: header
          required: true
          schema:
            type: string
            default: 2.6.0
          x-speakeasy-globals-hidden: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                organization_slug:
                  type: string
                  minLength: 1
                  description: >-
                    Public tenant organization slug, without the master
                    organization suffix.
                env:
                  enum:
                    - test
                    - live
                  type: string
                  description: Stripe connection environment to inspect or disconnect.
              required:
                - organization_slug
                - env
              title: GetStripeConnectionParams
              examples:
                - organization_slug: my-app
                  env: test
            example:
              organization_slug: my-app
              env: test
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  connected:
                    type: boolean
                    description: >-
                      Whether an OAuth connection is stored. Excludes
                      platform-managed accounts, default sandbox accounts, and
                      separate secret-key connections.
                  account_id:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: OAuth-connected Stripe account ID, or null when absent.
                  connected_at:
                    anyOf:
                      - type: number
                      - type: 'null'
                    description: >-
                      Connection timestamp in Unix milliseconds, or null for
                      historical connections without a timestamp and when
                      disconnected.
                required:
                  - connected
                  - account_id
                  - connected_at
                title: GetStripeConnectionResponse
                examples:
                  - connected: true
                    account_id: acct_example
                    connected_at: 1781113864000
                  - connected: false
                    account_id: null
                    connected_at: null
              example:
                connected: true
                account_id: acct_example
                connected_at: 1781113864000
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Autumn } from 'autumn-js'

            const autumn = new Autumn()

            const result = await autumn.platform.getStripeConnection({
              organizationSlug: "my-app",
              env: "test",
            });
        - lang: python
          label: Python (SDK)
          source: |-
            from autumn_sdk import Autumn

            autumn = Autumn(secret_key="am_sk_test...")

            res = autumn.platform.get_stripe_connection(
                organization_slug="my-app",
                env="test",
            )
components:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.