The onboarding API creates a Flint account from an email address and makes the first sandbox API key available after email verification, without sending the developer through the Flint dashboard. It also drives embedded merchant onboarding as a state machine: start with an email, verify it to receive an onboarding_session_token, then read GET /v1/onboarding/state. Submit machine-completable work using next_step.submit_method, next_step.submit_endpoint, and required_fields. Profile and account intent go to POST /v1/onboarding/advance. Browser and review steps omit the submit method and endpoint. When next_step.launch requires a human browser, mint credentials separately with POST /v1/merchant-account-sessions, render the returned embedded components, then poll state.
next_step.launch.endpoint uses the same public API base as next_step.submit_endpoint: absolute when configured, relative otherwise.
The onboarding_session_token is a sandbox-only setup credential. On GET /v1/onboarding/state, POST /v1/onboarding/advance, and POST /v1/merchant-account-sessions, a session request without sandbox_id targets the merchant's default sandbox, and sandbox_id can name another sandbox of the same merchant. The session never reaches the live account. If the merchant has no default sandbox, these requests return SANDBOX_SELECTION_REQUIRED. The same routes also accept an API key: a sandbox key reaches its sandbox, and a live key created in the dashboard drives live onboarding and later remediation with sandbox_id omitted. The initial key is sandbox-bound and can be issued while provider verification is still outstanding. Payment and payout operations stay gated by their requested capabilities. Browser exit is never completion. State and readiness are backend-observed, pending_verification means wait, and merchant-account-session refresh uses POST /v1/merchant-account-sessions/refresh with the latest signed launch_token.
When no onboarding actions remain and the first key can be issued, status is ready_for_api_key with create_api_key as next_step, even if review is pending or onboarding is complete. After the key exists, status reflects review or completion.
The merchant's onboarding_status stays completed once reached, even when Stripe later asks for more details. Read requirements and next_step to find work that is due after completion.
The create_api_key action uses submit_method: "POST" and lists name in required_fields. POST /v1/onboarding/api-key accepts an optional sandbox_id in the JSON body or query string, and a non-empty body value takes precedence. Its returned submit endpoint includes the query parameter when a sandbox is selected. Omit both values to use the default sandbox.
POST /v1/onboarding/start sends a code and returns a verification token. Each token allows five incorrect code attempts; later attempts return VERIFICATION_ATTEMPTS_EXCEEDED. Correct codes do not count against either limit, including retries with merchant_id after 409 MERCHANT_SELECTION_REQUIRED or after a server error. Start again with a new idempotency key to send a new code and get a new token. After 20 incorrect codes per email in one hour, start and verify return 429 RATE_LIMIT_EXCEEDED with Retry-After.
POST /v1/onboarding/verify-email returns onboarding_session_expires_at, the UTC expiry of the 24-hour session, and default_sandbox_id, the sandbox the session targets by default. The session cannot be refreshed; verify the email again to get a new one. Its can_issue_api_key is true when the merchant has no external API key and a default sandbox exists. merchant_created tells you whether this request created the merchant. Read GET /v1/onboarding/state for the workflow status and available actions.
If verification returns 503 IDENTITY_UNAVAILABLE, retry after a short delay. For 500 IDENTITY_RESOLUTION_FAILED, contact Flint support. An email that already has a Flint account returns 409 EMAIL_ALREADY_LINKED, and an account that already issued its first key returns 409 INITIAL_API_KEY_ALREADY_CREATED from POST /v1/onboarding/api-key. In both cases, sign in with flint login or the dashboard instead of signing up again.
The API and agent onboarding guide walks through the full state machine, including document handling and first-key issuance.
Local development with the CLI#
If you already have a Flint account, use browser login and verify your setup:
flint login
flint doctor
Confirm the terminal code in your browser, choose your merchant and sandbox, and approve the requested permissions. The CLI refreshes access automatically. Use flint login --no-open to open the link yourself, --profile NAME for another profile, and --live for explicit production access. flint logout --confirm revokes the OAuth session. See the CLI guide for session lifetimes and revocation.
Use flint signup to create an account from the terminal, flint auth import for an existing API key, or FLINT_API_KEY for CI.
