> ## 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.

# Update Connected Stripe Account

> Updates a platform organization's Stripe Connect configuration. Associates a Stripe account ID with the organization using your master Stripe credentials.

<Info>
  Updates a platform organization's Stripe Connect configuration. Associates a Stripe account ID with the organization using your master Stripe credentials.
</Info>

## When to Use This Endpoint

Use this endpoint when you want to manage Stripe accounts on behalf of your tenants using your own Stripe Connect credentials, rather than having them go through the OAuth flow.

## Validation

* Your organization must have the corresponding Stripe secret key connected (test/live)
* The endpoint validates that your master Stripe account can access the provided account ID
* If validation fails, you'll receive a descriptive error message

<Note>
  The `master_org_id` is automatically set to your organization ID. All Stripe operations for the tenant will use your master Stripe credentials with the tenant's account ID.
</Note>

<Warning>
  At least one of `test_account_id` or `live_account_id` must be provided in the request.
</Warning>


## OpenAPI

````yaml platform POST /platform/organizations/stripe
openapi: 3.0.0
info:
  title: Platform API (Beta)
  version: 1.0.0
  description: >
    **Private Preview** - Contact hey@useautumn.com to get access.


    The Platform API allows you to manage organizations and Stripe Connect
    accounts on behalf of your tenants. All endpoints require platform feature
    access.
servers:
  - url: https://api.useautumn.com/v1
security:
  - bearerAuth: []
paths:
  /platform/organizations/stripe:
    post:
      summary: Update Connected Stripe Account
      description: >-
        Updates a platform organization's Stripe Connect configuration.
        Associates a Stripe account ID with the organization using your master
        Stripe credentials.
      operationId: updateStripeConfig
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStripeConfigRequest'
      responses:
        '200':
          description: Stripe configuration updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateStripeConfigResponse'
        '400':
          description: Invalid request parameters or validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
      x-code-samples:
        - lang: curl
          source: >
            curl -X POST
            'https://api.useautumn.com/v1/platform/organizations/stripe' \

            -H 'Authorization: Bearer am_sk_test_...' \

            -H 'Content-Type: application/json' \

            -d '{
              "organization_slug": "tenant-org",
              "test_account_id": "acct_1234567890",
              "live_account_id": "acct_0987654321"
            }'
components:
  schemas:
    UpdateStripeConfigRequest:
      type: object
      required:
        - organization_slug
      properties:
        organization_slug:
          type: string
          description: The slug of the organization (without the org ID prefix).
        test_account_id:
          type: string
          description: Stripe account ID for test environment (e.g., acct_xxx).
        live_account_id:
          type: string
          description: Stripe account ID for live environment (e.g., acct_xxx).
    UpdateStripeConfigResponse:
      type: object
      properties:
        message:
          type: string
          description: Success message.
        organization:
          type: object
          properties:
            id:
              type: string
              description: Internal organization ID.
            slug:
              type: string
              description: Organization slug (without prefix).
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error description.
        code:
          type: string
          description: Error code.
          enum:
            - not_found
            - forbidden
            - invalid_input
            - internal_error
            - not_allowed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Autumn API key with Bearer prefix

````