POST /api/v2/storefront/billing/account-session
Creates an embedded Stripe Connect account session and returns a clientSecret. Use it to mount Stripe Connect components in your own UI for in-app onboarding, instead of redirecting the operator to a Stripe-hosted page. Pass the clientSecret to the Stripe Connect.js front-end SDK.
Request
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
targetCustomerId | number | No | Query param. Parent customers create a session for a child account |
Response
clientSecret initializes the Stripe Connect embedded components in your front end. Account sessions are short-lived — create a new one each time you mount the embedded UI.
Errors
400 VALIDATION_ERROR— no Stripe account provisioned yet, or Stripe is not configured on the server.
Related
Billing tasks
All billing operations
Get onboarding URL
Hosted onboarding redirect instead
Get account status
Check onboarding progress
Billing overview
Stripe Connect concepts