Create or resume onboarding
POST /api/stripe/connect
Request
Response (200)
400 invalid input, 401 unauthenticated, 403 non-self request, 404 missing customer, 409 existing connection cannot be verified, or 500 provider failure. A 409 is not permission to automatically replace the merchant account; resolve the connection with support.
Start existing-account OAuth
POST /api/stripe/oauth-start
Send a valid redirect_uri URL registered for the integration’s Stripe OAuth flow.
Request
Response (200)
code and state for completion. State is scoped to the signed-in customer and expires after 30 minutes.
Errors: 400 invalid URI, 401 unauthenticated, 403 disallowed delegated access, 409 an account is already linked, and 503 existing-account connection unavailable.
Complete existing-account OAuth
POST /api/stripe/oauth-complete
Required code is 1-200 characters; required state is 1-2000 characters. Use the exact callback values and the same customer identity.
Request
Response (200)
400 invalid input/code exchange or wrong provider mode, 401 unauthenticated, 403 expired/mismatched state or disallowed access, 409 an account is already linked (including a concurrent connection), and 500 failure to save/retrieve the connection.
Refresh account status
GET /api/stripe/account-status
No query fields. Reads the signed-in customer’s linked account from Stripe and can update saved onboarding flags.
Response (200)
Response (200, no connection)
stale: true and omits the display fields. Do not interpret stale data as fresh confirmation of capability or as evidence the account was deleted. Missing authentication returns 401.
Create a payouts session
GET /api/stripe/create-payouts-session
Required query accountId is the signed-in customer’s linked Stripe account ID.
Response (200)
error: 400 missing/invalid account ID, 401 unauthenticated, 403 account does not belong to the caller, and 500 provider failure.