Merchant account sessions
Merchant account sessions authorize short-lived, embedded account-management components. Create and refresh them only from your backend. Your backend must authenticate the person who will use the components, and confirm they may manage this merchant, before it returns a client secret to the browser.
A session lets that person complete onboarding, identity verification, and account upkeep inside your product. Flint returns what Stripe Connect.js needs to mount the components: a publishable key, a short-lived client secret, and the collection options for each component. To send the person to onboarding that Flint hosts instead, create an onboarding access link. Don't accept a merchant ID from the browser as proof of access, and never put a Flint key, a client secret, or a launch_token in a URL or a browser bundle.
How a session runs#
- Browser sends open account setup to Your backend
- Your backend sends create a session to Flint
- Flint returns launch_token, client_session to Your backend
- Your backend returns session response to Browser
- Browser sends fetchClientSecret to Your backend
- Your backend sends refresh with launch_token to Flint
- Flint returns new secret and launch_token to Your backend
- Browser sends onExit to Your backend
- Your backend sends read the onboarding state to Flint
Each session carries two secrets that expire separately:
| Value | Held by | Expires at | When it expires |
|---|---|---|---|
client_session.stripe.account_session.client_secret | Connect.js in the browser | client_session.expires_at | Connect.js calls fetchClientSecret. Send a refresh. |
launch_token | Your backend session or page memory | launch_token_expires_at | Authorize the person again and create a new session. |
Components#
Send a non-empty components array. It's a set: duplicates are rejected, and the response lists the components in the order of this table. One session, and one Connect instance, can mount several components.
| Component | Connect.js element | Use it for |
|---|---|---|
account_onboarding | account-onboarding | First-time identity, business, document, agreement, and payout account collection, and targeted remediation later. |
account_management | account-management | Ongoing business profile and compliance upkeep. |
payouts | payouts | Adding and updating payout accounts, and managing payouts. |
balances | balances | Viewing balances and payout timing. |
tax_documents | documents | Viewing account documents and Form 1099-K, which Flint files through Stripe when required. The session doesn't return form data or PDFs. |
notification_banner | notification-banner | Showing current risk, compliance, and account notices. |
payments | payments | Listing payments and showing each one's details, with dispute responses. Refunds and capture stay in Flint. |
account_onboarding and account_management are policy-aware: they collect account information, so they take the collection fields below. A session can hold at most one of them.
Payments component#
payments shows the merchant's payments, each payment's details, and its disputes, so a platform can place a payments table in its own product. Flint configures the component as follows:
| Action in the component | Available | Do it instead with |
|---|---|---|
| Respond to a dispute with evidence, or accept it | Yes | Also POST /v1/disputes/{dispute_id}/accept, or a dispute response session |
| Refund a payment | No | POST /v1/refunds, or the Flint dashboard |
| Capture or cancel an authorized payment | No | POST /v1/payment-intents/{payment_intent_id}/capture or /cancel |
Refunds and captures go through Flint so that each one gets a Flint refund or payment record, updates the order, and sends Flint's webhooks. A refund made in the component would skip all of that. A dispute response goes to the bank either way, and Flint records the dispute's new status from the processor's dispute events, as it does for a dispute response session. So dispute.* webhooks and GET /v1/disputes stay accurate after a response in the component.
An API key or CLI login opening payments also needs payments.payment_intents.read and payments.disputes.write, the scopes the matching payment and dispute routes require. Without them, create returns 403 INSUFFICIENT_SCOPE with param naming the component, such as components[0]. A refresh with a credential that no longer has them returns 403 INSUFFICIENT_SCOPE without param. A partner app token can't open payments; the platform uses the merchant's own credential for it. An install with payments.disputes.write can answer disputes through a dispute response session instead.
Collection policy#
collection_strategy, future_requirements, and targeted_requirements decide what a policy-aware component asks for. They require a policy-aware component, and targeted_requirements requires account_onboarding.
When an action's action_type is create_merchant_account_session, its merchant_account_session object is the request body: send it unchanged, with its components, policy, and requirement codes, instead of deriving them from requirement names. These actions appear in the onboarding state's next_step and in next_actions under readiness on GET /v1/merchant. Error, warning, and payout-setting next actions use the same body shape when they include merchant_account_session. If an action omits the body, read GET /v1/merchant and use its readiness recommendation instead of choosing a collection policy yourself.
- GET
/v1/onboarding/stateRequired API key scopes: merchants.onboarding.read or merchants.onboarding.writemerchants.onboarding.readormerchants.onboarding.writeReference for GET /v1/onboarding/stateDuring first-time onboarding,
next_stepcarries the session body when the account owner has to act. - GET
/v1/merchantRequired API key scopes: merchants.profile.read or merchants.profile.writemerchants.profile.readormerchants.profile.writeReference for GET /v1/merchantAfter onboarding,
readinesslists what's due and carries the session body for remediation.
When you leave the policy fields out, Flint chooses them from the account's state:
| Account state | collection_strategy | future_requirements | targeting |
|---|---|---|---|
| Onboarding not finished yet | incremental | omit | all |
| Onboarding finished, nothing due | upfront | include | all |
| Onboarding finished, requirements due | upfront | omit | targeted for account_onboarding when Flint can target every due requirement, otherwise all_due |
The first-onboarding default collects only what the payment processor needs now, so the form is shorter and the processor can ask for more later. To collect everything up front, including requirements that aren't due yet, send "collection_strategy": "upfront" and "future_requirements": "include".
When readiness lists requirements in upcoming_due, which the payment processor starts requiring on upcoming_due_at, its recommended create_merchant_account_session body sets "future_requirements": "include", so the session collects them before that date. The defaults above don't look at upcoming_due, so send the recommended body unchanged, or send "future_requirements": "include" yourself. See Requirement codes.
The response reports what applies in effective_policy, and gives each policy-aware component collection_options for the browser: fields is currently_due for incremental and eventually_due for upfront, future_requirements passes through, and requirements.only appears only when targeting is targeted.
targeting on merchant account session effective policynoneThe session has no policy-aware component, so nothing is collected.collection_strategyandfuture_requirementsare left out.allThe component collects every requirement within itsfieldsbreadth.all_dueThe account has requirements due, and the component collects all of them without a targeted list.targetedThe component collects only the requirements incollection_options.requirements.only.
A refresh keeps the components and policy of the session that issued its launch token. To change either, create a new session.
Pass collection_options to the component unchanged. Flint limits the provider session to the components you requested, but the browser applies the collection options, so effective_policy states what the session authorizes, not proof of what the browser mounted.
Targeted remediation#
targeted_requirements takes Flint requirement codes, never provider field names. Copy them from the action, for example:
{
"components": ["account_onboarding"],
"collection_strategy": "incremental",
"future_requirements": "omit",
"targeted_requirements": ["business_website"]
}
Flint maps each code to the account's outstanding requirements and returns the provider values only in client_session.stripe.components[].collection_options.requirements.only. A request can name at most 100 codes.
- A code that isn't a published Flint code returns
400 INVALID_REQUESTwith anINVALID_VALUEdetail at the item, such astargeted_requirements[0]. - A published code Flint can't target, because the account has no outstanding requirement it maps to, returns
400 INVALID_REQUESTwith anINVALID_VALUEdetail ontargeted_requirementsand one more detail for each such item, such astargeted_requirements[1]. Each item's message lists the codes the account can target now, or says that nothing is outstanding. A sandbox created withinitial_onboarding: "complete"has nothing outstanding; create one with"not_started"to rehearse targeted remediation.
Neither error returns a client secret. Don't retry with untargeted collection: read the onboarding state or readiness again and send the action it returns.
Create a session#
The session opens in the environment the credential reaches; the request takes no sandbox_id. This request mounts onboarding with a notification banner, using the default policy:
curl -X POST https://api.withflintpay.com/v1/merchant-account-sessions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: onboarding-owner-123-1" \
-d '{
"components": ["account_onboarding", "notification_banner"]
}'
{
"data": {
"components": ["account_onboarding", "notification_banner"],
"effective_policy": {
"collection_strategy": "incremental",
"future_requirements": "omit",
"targeting": "all"
},
"launch_token": "aslaunch_v1.example",
"launch_token_expires_at": "2026-10-28T18:30:00Z",
"client_session": {
"expires_at": "2026-10-28T18:00:00Z",
"stripe": {
"publishable_key": "pk_test_example",
"account_session": {
"stripe_js_call": "load_connect_and_initialize",
"client_secret": "acct_session_secret_example"
},
"components": [
{
"component": "account_onboarding",
"collection_options": {
"fields": "currently_due",
"future_requirements": "omit"
}
},
{
"component": "notification_banner"
}
]
}
}
},
"request_id": "req_01KWM6K7MY5GPZG3NAT0FV4QZF"
}
stripe_js_call is load_connect_and_initialize: call loadConnectAndInitialize with publishable_key and a fetchClientSecret callback. Connect.js initializes from the client secret alone and takes no connected account ID. The response has no requirements snapshot; read readiness.requirements on GET /v1/merchant for what's due.
Credentials#
| Credential | Session opens in | Refresh with |
|---|---|---|
| Sandbox key | That key's sandbox | The same key |
| Live key | The live account | The same key |
| Live CLI login | The live account | A CLI login for the same user |
| Onboarding session token | The merchant's default sandbox | An onboarding session for the same user |
| Partner app token | The selected merchant's grant: its sandbox in test mode. Live only while the app's merchant_onboarding platform capability is active | A partner app token for the same merchant and mode, under the same consent |
API keys, CLI logins, and partner app tokens need the merchants.account_sessions.write scope. In live mode, while the partner app's merchant_onboarding platform capability isn't active, a partner app token gets 409 ACTION_NOT_ALLOWED on create and refresh, with a reason from the app's platform status such as platform_onboarding_required. A partner app token can open only account_onboarding and notification_banner; another component returns 400 INVALID_REQUEST with detail NOT_ALLOWED and param naming it. That includes balances and payouts for an install that can read balances and payouts through the API, because those components also change bank details and the payout schedule. It includes payments too, even for an install that can answer disputes through the API. Open those with the merchant's own credential. A partner app token proves the merchant approved the app, not who is at the browser, so the platform's backend authenticates the person the same way before it returns a client secret. A launch token from an install keeps working as the platform mints new partner app tokens, and stops when the merchant revokes the install or grant or authorizes again. See Onboard an installed merchant and which environment a credential reaches.
Refresh a session#
Connect.js calls fetchClientSecret again when the client secret expires. Your browser asks your backend, which repeats its authorization check and sends the newest launch token:
curl -X POST https://api.withflintpay.com/v1/merchant-account-session-refreshes \
-H "Authorization: Bearer YOUR_API_KEY_OR_PARTNER_APP_TOKEN" \
-H "Flint-Merchant-Id: mer_01KWM4M2YB1SN9TPQ3Z6D7X8C9" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: onboarding-owner-123-refresh-1" \
-d '{"launch_token": "aslaunch_v1.example"}'
An app-level partner app token requires Flint-Merchant-Id on create and refresh. Your backend selects this merchant from its authenticated, authorized context.
The response has the same shape as create, with a new client secret and a new launch_token. A successful refresh supersedes its input launch token; that token can no longer create a new session. Send a new Idempotency-Key with each refresh, keep only the newest token, and send refreshes one at a time so each sends the token the previous one returned.
Before it creates the new provider session, Flint checks that the token was issued to the credential you send and to the environment it reaches, then rechecks the account and the token's components. A token issued to another credential returns 403 FORBIDDEN. An expired, superseded, or unreadable token returns 400 INVALID_REQUEST with param set to launch_token. After either, authorize the person again and create a new session instead of refreshing.
Retries and replay#
Create and refresh both accept an optional Idempotency-Key. Retry with the same key and body when no response arrived, or when the error's remediation.retry is same_request.
- Within 24 hours, a retry of a request that succeeded returns its original result unchanged: the same launch token, client secret, policy, and expiry timestamps. Flint doesn't create another provider session. The replay carries the
Idempotency-Replayed: trueheader,meta.idempotency_replayed: true, and the retry's ownrequest_id. - Only the original credential can replay, meaning the same API key, a CLI login or onboarding session for the same user, or a partner app token for the same merchant, mode, and consent. Flint rechecks it on every replay, and any other credential gets
403 FORBIDDENwithout the result. - The same key with a different body returns
409 IDEMPOTENCY_KEY_REUSED. - After 24 hours, Flint no longer holds the result, and the same key runs as a new request.
- Without a key, every create creates a new session, and each refresh requires an active launch token.
A replay doesn't extend either expiry or reactivate a superseded token, so it can return a client secret or launch token that has already expired or been superseded. Each new secret is a new request with a new key: a refresh while the launch token is valid, or a create after it expires. The idempotency guide covers keys across the API.
Mount the components#
Install Connect.js, and the React wrappers if you use React:
npm install @stripe/connect-js
npm install @stripe/react-connect-js
Your backend needs two routes, both behind your sign-in and a check that the person may manage the merchant:
POST /account-sessionsends the action'smerchant_account_sessionbody toPOST /v1/merchant-account-sessions.POST /account-session/refreshforwards the browser'slaunch_tokenandIdempotency-KeytoPOST /v1/merchant-account-session-refreshes.
For an app-level partner app token, both routes also send Flint-Merchant-Id, selected by your backend after authorizing the person for that merchant. Don't forward an unchecked merchant ID from the browser.
Each returns Flint's response body and status, including errors, to that browser only. The browser below creates one session, hands its first client secret to Connect.js, and serializes refreshes. A refresh that gets no answer, or an error whose remediation.retry is same_request, is retried with its original token and key. Any other refresh error ends that launch token, and the browser creates a new session.
<div id="account"></div>
<script type="module" src="/account-setup.js"></script>
import { loadConnectAndInitialize } from "@stripe/connect-js";
async function createSession() {
const response = await fetch("/account-session", {
method: "POST",
credentials: "same-origin",
});
const body = await response.json();
if (!response.ok) throw new Error(body.error?.message ?? "Account session failed");
return body.data;
}
const session = await createSession();
let launchToken = session.launch_token;
let firstSecret = session.client_session.stripe.account_session.client_secret;
let pending; // an unanswered refresh, retried with the same token and key
let queue = Promise.resolve();
async function refresh() {
pending ??= { token: launchToken, key: crypto.randomUUID() };
const response = await fetch("/account-session/refresh", {
method: "POST",
credentials: "same-origin",
headers: { "Content-Type": "application/json", "Idempotency-Key": pending.key },
body: JSON.stringify({ launch_token: pending.token }),
});
const body = await response.json();
if (response.ok) {
pending = undefined;
launchToken = body.data.launch_token;
return body.data.client_session.stripe.account_session.client_secret;
}
if (body.error?.remediation?.retry === "same_request") {
throw new Error(body.error.message);
}
// The launch token expired or was refused: authorize again with a new session.
pending = undefined;
const fresh = await createSession();
launchToken = fresh.launch_token;
return fresh.client_session.stripe.account_session.client_secret;
}
function fetchClientSecret() {
if (firstSecret) {
const secret = firstSecret;
firstSecret = undefined;
return Promise.resolve(secret);
}
const next = queue.then(refresh);
queue = next.catch(() => {});
return next;
}
const stripe = session.client_session.stripe;
const connect = loadConnectAndInitialize({
publishableKey: stripe.publishable_key,
fetchClientSecret,
});
for (const grant of stripe.components) {
const element = connect.create(grant.component.replaceAll("_", "-"));
const options = grant.collection_options;
if (options) {
element.setCollectionOptions({
fields: options.fields,
futureRequirements: options.future_requirements,
requirements: options.requirements,
});
}
if (grant.component === "account_onboarding") {
// Exit means the person left the component, not that verification finished.
// Have your backend start reading GET /v1/onboarding/state.
element.setOnExit(() => fetch("/onboarding/exited", { method: "POST" }));
}
document.querySelector("#account").appendChild(element);
}
// Call logout only when the person signs out of your product, not on navigation.
window.addEventListener("app:logout", () => connect.logout());
In React, replace the mounting loop: pass the same Connect instance to one provider and map collection_options to the collectionOptions prop.
import {
ConnectAccountOnboarding,
ConnectComponentsProvider,
ConnectNotificationBanner,
} from "@stripe/react-connect-js";
// connect and session come from the example above.
const onboarding = session.client_session.stripe.components.find(
(grant) => grant.component === "account_onboarding",
);
export function AccountSetup({ onExit }: { onExit: () => void }) {
const options = onboarding?.collection_options;
return (
<ConnectComponentsProvider connectInstance={connect}>
<ConnectNotificationBanner />
{options && (
<ConnectAccountOnboarding
collectionOptions={{
fields: options.fields,
futureRequirements: options.future_requirements,
requirements: options.requirements,
}}
onExit={onExit}
/>
)}
</ConnectComponentsProvider>
);
}
After the person exits#
onExit means only that the person left Account Onboarding. Read GET /v1/onboarding/state right away, then after 2, 4, 8, and 15 seconds, then every 30 seconds for up to 15 minutes. While status is waiting_for_review, keep waiting without creating another session. When next_step is another create_merchant_account_session, send its body in a new session. After the owner exits covers the full loop and the merchant.readiness_updated webhook.
Browser and security requirements#
- Content Security Policy. Allow
https://connect-js.stripe.comandhttps://js.stripe.cominframe-srcandscript-src,https://*.stripe.cominimg-src, and'sha256-0hAheEzaMe6uXIKV4EehS9pu1am1lj/KnnzrOYqckXk='instyle-src. - Cross-Origin-Opener-Policy. Leave it unset or use
unsafe-none.same-originbreaks the sign-in popups the components need. - Popups. Don't block them. Account Onboarding, Account Management, Balances, Payouts, and Notification Banner can ask the person to authenticate in a Stripe-owned popup.
- One Connect instance. Mount every component in the session from one instance, and call
logout()only when the person signs out of your product. - Browsers only. Connect embedded components don't run in web views inside mobile or desktop apps; open a browser instead.
Onboarding access links#
If your product doesn't embed Connect.js, send the person to onboarding that Flint hosts. Create an onboarding access link with the credential you'd use for a session, and redirect the person to its url.
curl -X POST https://api.withflintpay.com/v1/onboarding/access-links \
-H "Authorization: Bearer $FLINT_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: onboarding-link-owner-123-1" \
-d '{"return_url": "https://classboard.example/settings/payments"}'
{
"data": {
"url": "https://app.withflintpay.com/onboard#oal_v1.Qm9vdHN0cmFwIHRva2Vu",
"expires_at": "2026-11-12T18:09:11Z",
"purpose": "merchant_onboarding",
"return_url": "https://classboard.example/settings/payments"
},
"request_id": "req_01KWM6P19KJRRC7B8BBEAQQ1KB"
}
- Flint's onboarding page shows "Verification for {business name}", adds "requested by {app name}" for a partner app install token, and opens Account Onboarding and Notification Banner in the credential's mode.
- The link opens once, within 5 minutes. Opening it starts a browser session of up to an hour. When the person exits or finishes, or opens a link that was already used or has expired, Flint's page offers one action: back to
return_url. return_urlis required: an absolutehttpsURL without credentials, up to 2,048 characters. With a partner app install token, its origin must be the origin of your app'smerchant_action_urlor of one of its redirect URIs.- Every refresh of Flint's page rechecks the credential that created the link, as a session refresh does. Revoking the API key, CLI login, or install, or the merchant authorizing the app again, ends the session at its next refresh.
- A partner app install token works in live mode only while the app's
merchant_onboardingplatform capability is active, the same rule as for sessions. - Advance onboarding before you create a link, as before a session.
- A retry with the same
Idempotency-Keyand body returns the same link to the same credential, under the replay rules for sessions, without extending its 5 minutes or restoring its one open. Use a new key for each new link.
The url is a bearer credential: whoever opens it can enter identity and bank details for the merchant. Create a link only for a person your backend just authenticated and authorized for this merchant, redirect them to it at once, and never email it, log it, or show it in your product. Its token rides in the URL fragment, so it never reaches a server log or a Referer header.
Headless applications and provider emails#
A headless backend still needs an authenticated browser page for verification only a person can do. Send the account owner a short-lived, signed link into your own product, require them to sign in, authorize them for the merchant, and mount the component there or redirect them to an onboarding access link. The link identifies your pending workflow; it must not contain Flint credentials, a provider account ID, or a client secret.
Emails the payment processor sends about compliance, risk, payouts, payments, the account, or documents are different. Their links open Flint's own sign-in, even when your product embeds onboarding. After the recipient signs in, Flint resolves the provider reference on its servers and mounts the matching component. So the account owner keeps a Flint login. Don't intercept or rewrite those links.
One exception applies to a merchant your app created with a merchant signup. While your install manages it, the processor's notification link and Flint's emails about finishing verification lead to your app's merchant_action_url, where your handler can mount account_onboarding or redirect to an onboarding access link. The processor's account, payouts, balances, documents, payments, and disputes links, Flint's dispute and payout notices, and risk and review notices still lead to Flint's sign-in. Emails that lead to your app has the details.
Sandbox verification values#
In a sandbox, enter only payment processor test values. For a US account, these complete Account Onboarding successfully:
| Field | Test value |
|---|---|
| SMS code | 000-000 |
| Street address | address_full_match, with a valid city, state, and postal code |
| Date of birth | 1901-01-01 |
| SSN or personal ID | 000000000, or 0000 when only the last four digits are asked for |
| Business tax ID | 000000000 |
| Phone | 0000000000 |
| Website | https://accessible.stripe.com |
| Payout routing number | 110000000 |
| Payout account number | 000123456789 |
Stripe's Connect test values simulate verification results. Account Onboarding shows the account's outstanding requirements, so an account whose test values have already satisfied them can skip those screens.
- To enter the bank numbers above, choose Enter test bank account credentials instead when shown.
- At the optional Link Save account prompt, choose Finish without saving to continue without Link.
- Editing a completed account can open Stripe sign-in. Use the test SMS code above; if the sandbox offers Skip this step for identity questions, you can select it.
Complete every field the component shows, including the payout account and the provider agreement, then poll the onboarding state until status is complete. For documents, use the test images the uploader offers, and never upload a real identity document to a sandbox. Sandbox verification can finish asynchronously, so test against Flint's readiness on GET /v1/merchant rather than against what the component shows.
Errors#
- StatusHTTP 400CodeINVALID_
REQUEST What to dodetails[0].paramnames the field. For an onboarding access link,return_urlis missing (REQUIRED) or breaks the return URL rules (INVALID_VALUE).componentsis empty (REQUIRED), or has a duplicate or unknown value (INVALID_VALUE). The session has two policy-aware components, or policy fields without one, ortargeted_requirementswithoutaccount_onboarding(NOT_ALLOWED). A requirement code is unknown or can't be targeted (INVALID_VALUE); see targeted remediation. On refresh,launch_tokenis expired, superseded, or unreadable (INVALID_VALUE): create a new session. - StatusHTTP 403CodeFORBIDDENWhat to doReason
environment_mismatch: the launch token or replay belongs to another credential or environment, or an onboarding session token tried to reach the live account. Authorize the person and create a new session with the right credential. For an onboarding access link, reasonmerchant_role_insufficientmeans the CLI login's or onboarding session's person isn't a direct owner or admin of the merchant, andnot_permittedmeans the credential can't open sessions, such as a workload identity. - StatusHTTP 409What to doA partner app install token in live mode, while the app's
merchant_onboardingplatform capability isn't active.details[0].reasonisplatform_onboarding_required,platform_pending_review,platform_rejected, orplatform_capability_inactive. - StatusHTTP 403What to doThe API key or CLI login lacks
merchants.account_sessions.write, or the session asks forpaymentswithoutpayments.payment_intents.readandpayments.disputes.write. On create forpayments,paramnames the component; a refresh leavesparamout. - StatusHTTP 409What to doReason
onboarding_required: account setup hasn't started, so advance onboarding first. Reasonsaccount_setup_unavailable,account_setup_repair_required, andaccount_sessions_unavailableneed Flint support; retrying doesn't clear them. - StatusHTTP 409What to doThe key was already used for a different create or refresh. See Replay, conflict, or in progress.
- StatusHTTP 409What to doThe first request with this key is still running. See Replay, conflict, or in progress.
Related guides#
API and agent onboardingSign up, advance onboarding, and hand verification to the account owner.MerchantsReadiness, requirement codes, and the next actions that carry session bodies.OnboardingThe onboarding state and its next step.Refresh merchant account session#
/v1/merchant-account-session-refreshesIdempotentRequires scope merchants.account_sessions.write
Also requires payments.payment_intents.read and payments.disputes.write when the launch token's components include payments.
Rate limit: external_provider_action
Creates a fresh provider session from a signed launch token after rechecking the authenticated principal, merchant environment, account controller, and component grant. An onboarding session can refresh only sandbox launch tokens created by the same user with an onboarding session. The sandbox is pinned by the launch token, which is the merchant's default sandbox for an onboarding session. Live onboarding requires a live API key or live CLI login. A partner install token works in live mode only while its app's merchant_onboarding platform capability is active; otherwise it gets 409 ACTION_NOT_ALLOWED with the reason its platform status gives: platform_onboarding_required, platform_pending_review, platform_rejected, or platform_capability_inactive. Refresh requires the same credential that created the launch token. For an install token, that is any access token for the same environment grant and consent; revoking the install or grant, or authorizing again, ends the launch token. A same-key, same-input retry replays the encrypted original result for 24 hours, including its original credentials and expiries. Replay may return an expired credential. Use a new key for a new launch or refresh.
Request body
launch_tokenstringRequiredThe `launch_token` of the session to refresh. The response carries a new token to use for the next refresh.
Response · 200
The refreshed merchant account session.
dataobjectRequiredResource, collection, or operation result returned by this request.
client_sessionobjectBrowser initialization data required to mount embedded account-management components. These instructions are not merchant account resource state. Returned only to the credential that created it, and omitted when another credential replays the request.
componentsarray of enumRequiredThe components the session authorizes, in catalog order.
account_onboardingaccount_managementpayoutsbalancestax_documentsnotification_bannerpayments
effective_policyobjectRequiredThe collection policy Flint applied to the session.
launch_tokenstringSigned Flint token to exchange at POST /v1/merchant-account-session-refreshes. Each new refresh operation rotates this token; a same-key retry replays the original token. The caller must still authenticate and authorize the human using the session. Returned only to the credential that created it, and omitted when another credential replays the request.
launch_token_expires_atstringRequiredExpiry of launch_token in UTC. After expiry, create a new merchant account session.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/merchant-account-session-refreshes \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"launch_token": "aslaunch_v1.example"
}'Create merchant account session#
/v1/merchant-account-sessionsIdempotentRequires scope merchants.account_sessions.write
Also requires payments.payment_intents.read and payments.disputes.write when components includes payments.
Rate limit: external_provider_action
Creates an embedded browser handoff for one or more allowlisted account components. The credential selects the environment; the onboarding session token acts in the merchant's default sandbox. A partner install token works in live mode only while its app's merchant_onboarding platform capability is active; otherwise it gets 409 ACTION_NOT_ALLOWED with the reason its platform status gives: platform_onboarding_required, platform_pending_review, platform_rejected, or platform_capability_inactive. A same-key, same-input retry replays the encrypted original result for 24 hours, including its original credentials and expiries. Replay may return an expired credential. Use a new key for a new launch or refresh.
Request body
collection_strategyenumWhich requirements the session collects. If omitted, `incremental` for an account that hasn't finished onboarding, otherwise `upfront`. Only `account_onboarding` and `account_management` take it.
upfrontincremental
componentsarray of enumRequiredThe embedded components the session opens, such as `account_onboarding`. Send each component once. A partner app install token can open only `account_onboarding` and `notification_banner`; another component returns `400 INVALID_REQUEST` with detail `NOT_ALLOWED`. With an API key or CLI login, `payments` also requires `payments.payment_intents.read` and `payments.disputes.write`; without them the request returns `403 INSUFFICIENT_SCOPE`.
account_onboardingaccount_managementpayoutsbalancestax_documentsnotification_bannerpayments
future_requirementsenumWhether the session also collects requirements that will apply later. If omitted, `omit` while onboarding isn't finished or while something is due, otherwise `include`. Only `account_onboarding` and `account_management` take it.
omitinclude
targeted_requirementsarray of enumFlint requirement codes. New codes can appear; treat an unknown code as additional_account_information. At most 100 codes, each up to 255 UTF-8 bytes after trimming surrounding whitespace. Only `account_onboarding` takes them.
additional_account_informationbusiness_addressbusiness_descriptionbusiness_directorsbusiness_executivesbusiness_namebusiness_ownersbusiness_phonebusiness_support_emailbusiness_support_phonebusiness_support_urlbusiness_tax_idbusiness_verification_documentbusiness_websitemerchant_category_codeowner_addressowner_additional_identity_documentowner_date_of_birthowner_first_nameowner_identity_documentowner_last_nameowner_tax_id_last_fourpayout_destinationpayout_destination_ownership_documentrepresentative_addressrepresentative_additional_identity_documentrepresentative_date_of_birthrepresentative_emailrepresentative_first_namerepresentative_identity_documentrepresentative_last_namerepresentative_phonerepresentative_tax_idrepresentative_tax_id_last_fourterms_acceptancestatement_descriptor
Response · 200
The merchant-account-session launch and effective policy.
Same response as Refresh merchant account session.
curl -X POST https://api.withflintpay.com/v1/merchant-account-sessions \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"collection_strategy": "upfront",
"components": [
"account_onboarding"
],
"future_requirements": "include"
}'Create an onboarding access link#
/v1/onboarding/access-linksIdempotentRequires scope merchants.account_sessions.write
Rate limit: sensitive_write
Creates a link into Flint-hosted onboarding for the authenticated merchant environment, for products that don't embed Connect.js. The page opens Account Onboarding and Notification Banner in the credential's mode, names the business, and for a partner app install token names the app. The link opens once, within 5 minutes, into a browser session of at most an hour, and every refresh of the page rechecks the credential that created it: revoking the API key, CLI login, or install, or authorizing the app again, ends the page. When the person exits or finishes, or opens a used or expired link, the page offers one action: back to return_url. The url is a bearer credential that lets whoever opens it enter identity and bank details for the merchant. Create it only for a person you just authenticated and authorized for this merchant, redirect them to it at once, and never email or log it. Takes the credentials of POST /v1/merchant-account-sessions. A partner app install token works in live mode only while its app's merchant_onboarding platform capability is active; otherwise it gets 409 ACTION_NOT_ALLOWED with the reason its platform status gives: platform_onboarding_required, platform_pending_review, platform_rejected, or platform_capability_inactive. A same-key, same-input retry replays the original link for 24 hours without extending its lifetime or replenishing its open. Use a new key for a new link.
Request body
return_urlstringRequiredAn absolute https URL without credentials, up to 2,048 characters. Query strings and fragments are allowed. For a partner app install token, its origin must be the origin of the app's merchant_action_url or of one of its redirect URIs.
Response · 200
The one-time onboarding link and when it stops opening.
dataobjectRequiredResource, collection, or operation result returned by this request.
expires_atstringRequiredWhen the link stops opening what its purpose describes.
purposeenumRequiredWhat the link opens and how long it works. New purposes may be added; treat one you don't recognize as opening its resource.
order_viewsubscription_viewsubscription_managereturn_viewcustomer_accountmerchant_onboardingpayment_method_setup
return_urlstring or nullRequiredThe destination supplied when creating a customer, subscription, or onboarding access link. Null when omitted, always null for order and Return links, and always set for onboarding links.
urlstringThe link to send the person to. It carries a bearer credential, so anyone with it can open what its purpose describes until expires_at or until it reaches its open limit. Customer account links use the merchant's customer account host; onboarding links use Flint's dashboard host and carry the credential in the URL fragment. Returned only to the credential that created it, and omitted when another credential replays the request.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/onboarding/access-links \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"return_url": "https://classboard.example/settings/payments"
}'Was this helpful?