beginOnboardingSession

fun beginOnboardingSession(clientSecret: String)

Begins an onboarding session scoped to a single account.

While a session is active, the onboarding-session token authenticates every request, overriding the publishable and secret keys. This scopes the onboarding flow to one account — a bare publishable key would allow cross-account access. Call endOnboardingSession when the onboarding flow completes or is dismissed.

Parameters

clientSecret

The onboarding-session token (onb_sess_…) minted by your backend.