Skip to main content
POST
TypeScript
Generates a Stripe Connect OAuth URL for a platform organization. Use this to allow your tenants to connect their Stripe accounts through the OAuth flow.

OAuth Flow

After generating the OAuth URL:
  1. Redirect your tenant to the oauth_url
  2. User authorizes their Stripe account
  3. Stripe redirects to Autumn’s callback URL
  4. Autumn processes the authorization and redirects to your redirect_url
  5. Your redirect_url will receive query parameters:
    • success=true or success=false
    • message=... (if error occurred)
OAuth state is stored in Upstash with a 10-minute expiry. The organization must have been created via the platform API before generating an OAuth URL.

Authorizations

Authorization
string
header
required

Autumn API key with Bearer prefix

Body

application/json
organization_slug
string
required

The slug of the organization.

env
enum<string>
required

Environment: 'test' or 'live'.

Available options:
test,
live
redirect_url
string<uri>
required

URL to redirect to after OAuth completion.

Response

OAuth URL generated successfully

oauth_url
string<uri>

Stripe Connect OAuth URL to redirect the user to.