Skip to content

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#

An embedded onboarding sessionResponse
BrowserYour backendFlintopen account setupcreate a sessionlaunch_token, client_sessionsession responsefetchClientSecretrefresh with launch_tokennew secret and launch_tokenonExitread the onboarding state
  1. Browser sends open account setup to Your backend
  2. Your backend sends create a session to Flint
  3. Flint returns launch_token, client_session to Your backend
  4. Your backend returns session response to Browser
  5. Browser sends fetchClientSecret to Your backend
  6. Your backend sends refresh with launch_token to Flint
  7. Flint returns new secret and launch_token to Your backend
  8. Browser sends onExit to Your backend
  9. Your backend sends read the onboarding state to Flint

Each session carries two secrets that expire separately:

ValueHeld byExpires atWhen it expires
client_session.stripe.account_session.client_secretConnect.js in the browserclient_session.expires_atConnect.js calls fetchClientSecret. Send a refresh.
launch_tokenYour backend session or page memorylaunch_token_expires_atAuthorize 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.

ComponentConnect.js elementUse it for
account_onboardingaccount-onboardingFirst-time identity, business, document, agreement, and payout account collection, and targeted remediation later.
account_managementaccount-managementOngoing business profile and compliance upkeep.
payoutspayoutsAdding and updating payout accounts, and managing payouts.
balancesbalancesViewing balances and payout timing.
tax_documentsdocumentsViewing account documents and Form 1099-K, which Flint files through Stripe when required. The session doesn't return form data or PDFs.
notification_bannernotification-bannerShowing current risk, compliance, and account notices.
paymentspaymentsListing 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 componentAvailableDo it instead with
Respond to a dispute with evidence, or accept itYesAlso POST /v1/disputes/{dispute_id}/accept, or a dispute response session
Refund a paymentNoPOST /v1/refunds, or the Flint dashboard
Capture or cancel an authorized paymentNoPOST /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.writeReference for GET /v1/onboarding/state

    During first-time onboarding, next_step carries the session body when the account owner has to act.

  • GET/v1/merchantRequired API key scopes: merchants.profile.read or merchants.profile.writeReference for GET /v1/merchant

    After onboarding, readiness lists 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 statecollection_strategyfuture_requirementstargeting
Onboarding not finished yetincrementalomitall
Onboarding finished, nothing dueupfrontincludeall
Onboarding finished, requirements dueupfrontomittargeted 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 policy
  • none
    The session has no policy-aware component, so nothing is collected. collection_strategy and future_requirements are left out.
  • all
    The component collects every requirement within its fields breadth.
  • all_due
    The account has requirements due, and the component collects all of them without a targeted list.
  • targeted
    The component collects only the requirements in collection_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:

JSON
{
  "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_REQUEST with an INVALID_VALUE detail at the item, such as targeted_requirements[0].
  • A published code Flint can't target, because the account has no outstanding requirement it maps to, returns 400 INVALID_REQUEST with an INVALID_VALUE detail on targeted_requirements and one more detail for each such item, such as targeted_requirements[1]. Each item's message lists the codes the account can target now, or says that nothing is outstanding. A sandbox created with initial_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
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"]
  }'
Response
{
  "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#

CredentialSession opens inRefresh with
Sandbox keyThat key's sandboxThe same key
Live keyThe live accountThe same key
Live CLI loginThe live accountA CLI login for the same user
Onboarding session tokenThe merchant's default sandboxAn onboarding session for the same user
Partner app tokenThe selected merchant's grant: its sandbox in test mode. Live only while the app's merchant_onboarding platform capability is activeA 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
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: true header, meta.idempotency_replayed: true, and the retry's own request_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 FORBIDDEN without 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:

Shell
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-session sends the action's merchant_account_session body to POST /v1/merchant-account-sessions.
  • POST /account-session/refresh forwards the browser's launch_token and Idempotency-Key to POST /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.

HTML
<div id="account"></div>
<script type="module" src="/account-setup.js"></script>
JavaScript
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.

TSX
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.com and https://js.stripe.com in frame-src and script-src, https://*.stripe.com in img-src, and 'sha256-0hAheEzaMe6uXIKV4EehS9pu1am1lj/KnnzrOYqckXk=' in style-src.
  • Cross-Origin-Opener-Policy. Leave it unset or use unsafe-none. same-origin breaks 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.

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
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"}'
Response
{
  "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_url is required: an absolute https URL without credentials, up to 2,048 characters. With a partner app install token, its origin must be the origin of your app's merchant_action_url or 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_onboarding platform 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-Key and 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:

FieldTest value
SMS code000-000
Street addressaddress_full_match, with a valid city, state, and postal code
Date of birth1901-01-01
SSN or personal ID000000000, or 0000 when only the last four digits are asked for
Business tax ID000000000
Phone0000000000
Websitehttps://accessible.stripe.com
Payout routing number110000000
Payout account number000123456789

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#

  • HTTP 400
    details[0].param names the field. For an onboarding access link, return_url is missing (REQUIRED) or breaks the return URL rules (INVALID_VALUE). components is empty (REQUIRED), or has a duplicate or unknown value (INVALID_VALUE). The session has two policy-aware components, or policy fields without one, or targeted_requirements without account_onboarding (NOT_ALLOWED). A requirement code is unknown or can't be targeted (INVALID_VALUE); see targeted remediation. On refresh, launch_token is expired, superseded, or unreadable (INVALID_VALUE): create a new session.
  • HTTP 403
    Reason 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, reason merchant_role_insufficient means the CLI login's or onboarding session's person isn't a direct owner or admin of the merchant, and not_permitted means the credential can't open sessions, such as a workload identity.
  • HTTP 409
    A partner app install token in live mode, while the app's merchant_onboarding platform capability isn't active. details[0].reason is platform_onboarding_required, platform_pending_review, platform_rejected, or platform_capability_inactive.
  • HTTP 403
    The API key or CLI login lacks merchants.account_sessions.write, or the session asks for payments without payments.payment_intents.read and payments.disputes.write. On create for payments, param names the component; a refresh leaves param out.
  • HTTP 409
    Reason onboarding_required: account setup hasn't started, so advance onboarding first. Reasons account_setup_unavailable, account_setup_repair_required, and account_sessions_unavailable need Flint support; retrying doesn't clear them.
  • HTTP 409
    The key was already used for a different create or refresh. See Replay, conflict, or in progress.
  • HTTP 409
    IDEMPOTENCY_KEY_IN_PROGRESSRetry the same request
    The first request with this key is still running. See Replay, conflict, or in progress.
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#

POST/v1/merchant-account-session-refreshesIdempotent

Requires 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_tokenstringRequired

The `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.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

POST/v1/merchant-account-sessionsIdempotent

Requires 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_strategyenum

Which 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.

  • upfront
  • incremental
componentsarray of enumRequired

The 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_onboarding
  • account_management
  • payouts
  • balances
  • tax_documents
  • notification_banner
  • payments
future_requirementsenum

Whether 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.

  • omit
  • include
targeted_requirementsarray of enum

Flint 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_information
  • business_address
  • business_description
  • business_directors
  • business_executives
  • business_name
  • business_owners
  • business_phone
  • business_support_email
  • business_support_phone
  • business_support_url
  • business_tax_id
  • business_verification_document
  • business_website
  • merchant_category_code
  • owner_address
  • owner_additional_identity_document
  • owner_date_of_birth
  • owner_first_name
  • owner_identity_document
  • owner_last_name
  • owner_tax_id_last_four
  • payout_destination
  • payout_destination_ownership_document
  • representative_address
  • representative_additional_identity_document
  • representative_date_of_birth
  • representative_email
  • representative_first_name
  • representative_identity_document
  • representative_last_name
  • representative_phone
  • representative_tax_id
  • representative_tax_id_last_four
  • terms_acceptance
  • statement_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"
  }'

Was this helpful?