Onboarding
The onboarding API creates a Flint account from an email address, issues its first sandbox key, and walks the merchant through account verification, all from your backend or an agent. Use it when your product signs merchants up itself or embeds Flint onboarding in its own UI. If you can use the Flint dashboard, you don't need signup: create a test key on the API keys page instead. From a terminal, flint signup runs the signup calls for you; see the CLI guide. A platform that creates a merchant for each of its customers uses a merchant signup instead.
The work has two parts. Signup takes an email address to a merchant, a user, and a sandbox key. Onboarding is a loop: read the state, do what its next_step says, and read again until status is complete.
- Start.
POST /v1/onboarding/starttakes no credential. It emails a verification code and returns averification_tokenthat expires in 15 minutes. - Verify.
POST /v1/onboarding/verify-emailtakes no credential. It checks the code, creates the user, merchant, and default sandbox if they don't exist, and returns anonboarding_session_token. - Issue the first key.
POST /v1/api-keystakes the onboarding session,access, and the default sandbox'ssandbox_id, and returns the merchant's first sandbox key. - Run the loop.
GET /v1/onboarding/statereturnsstatusand the singlenext_step.POST /v1/onboarding/advancesubmits country, capabilities, and contact details, then returns the new state. Both take the onboarding session or an API key.
Signup#
Send optional timezone to POST /v1/onboarding/start with an IANA name such as America/Chicago. Flint sets it on a newly created merchant for reports and business dates. The merchant returned by email verification includes timezone when set. Existing merchants keep their time zone. If you omit it, reports and receipt PDFs use the business geography when it identifies a time zone, or UTC until one is available. Blank, invalid, and null values are rejected.
Verification codes. Each verification_token accepts five incorrect codes. After that, every attempt with it returns 409 LIMIT_REACHED, even with the right code; call start again with a new Idempotency-Key for a new code and token. A retry of start with the same key returns the original token. Correct codes never count against the limit.
Existing users. If the email already belongs to a Flint user, verification signs that user in: the session acts for their merchant, and the account keeps its name and email. If the account has two-step verification turned on, or the address is unverified on its sign-in, verification returns 409 ALREADY_EXISTS with reason dashboard_sign_in_required and no session; sign in to the Dashboard or run flint login. When the user belongs to several merchants and none is their default, verification returns 400 INVALID_REQUEST with detail code REQUIRED at merchant_id. Retry with the same token and code, a new Idempotency-Key, and a merchant_id from details[0].selectable_resources.
The onboarding session token is a setup credential, not an API key. Keep it on your backend and send it as Authorization: Bearer. It lasts 24 hours, until onboarding_session_expires_at, and can't be refreshed; verify the email again for a new one. It acts only in the merchant's default sandbox, default_sandbox_id, and never reaches the live account. It counts as freshly verified until fresh_verification_expires_at, 5 minutes after verification. The onboarding guide lists the routes it authenticates.
The first key. Send POST /v1/api-keys with the onboarding session, a name, access, and default_sandbox_id as sandbox_id. Agents should request access: "full". The key is bound to the default sandbox, and secret_key comes back only in that response. You can create it before the merchant finishes verification. full or read_only access, or the scopes accounts.api_keys.write, accounts.workload_identities.write, commerce.gift_cards.secrets.write, and commerce.license_keys.secrets.write, need a freshly verified session: create the key before fresh_verification_expires_at, or verify the email again.
Onboarding state#
status on onboarding statecompleteOnboarding is finished, whether or not the merchant has an API key. Requirements that come up later appear in merchant readiness.waiting_for_reviewFlint or the payment processor is reviewing what the owner submitted. Read the state again later, and don't create another account session.needs_external_actionThe account owner must complete a step in the embedded component.next_stepiscreate_merchant_account_session.needs_inputYour backend has a call to make, such as advancing onboarding.
Flint checks these values in the order listed, so a pending review always shows as waiting_for_review even when another step is also open.
next_step is a readiness action, the same shape as next_actions in merchant readiness. It's absent when nothing is left to do. Act on its action_type:
advance_onboarding: send the inputs listed inrequired_fieldstoPOST /v1/onboarding/advance. For example,countryis a top-level field andprofile.website_urlgoes insideprofile. If the state already includescountry, Flint can use that value when you omit it from the request. You can also sendrequested_capabilitiesto choose the initial capability set. The response is the new state.create_merchant_account_session: sendmerchant_account_sessionunchanged as the body ofPOST /v1/merchant-account-sessions, and mount the component for the authenticated account owner. Without Connect.js, send the owner to onboarding that Flint hosts with an onboarding access link.wait_for_review: read the state again later.other, or a value you don't recognize: new action types can appear. Read the state again later.
owner is flint for wait_for_review, while Flint or the payment processor reviews, and integrator for the steps your backend acts on.
Warning: Leaving the component isn't completion
When the account owner exits the embedded component, they may not have submitted everything. Read the onboarding state to learn what happened, and keep reading it while status is waiting_for_review. Follow the polling schedule in the onboarding guide.
Onboarding state describes setup, not whether the merchant can take payments now. For that, read readiness on GET /v1/merchant, which the onboarding session token can also read. Readiness also carries the requirements the payment processor asks for after onboarding; Handle later requirements shows how to collect them.
Credentials and environments#
The credential you send selects the environment. No onboarding route takes a sandbox_id.
| Credential | Reaches |
|---|---|
| Onboarding session token | The merchant's default sandbox |
Sandbox key (flint_test_...) | Its own sandbox |
Live key (flint_live_...) or live CLI login (flint login --live) | The live account |
| Partner app token | The selected merchant's grant environment. In live mode it reads onboarding, and advances it only while the app's merchant_onboarding platform capability is active. For a merchant the app created with a signup, this is the credential that runs live onboarding |
To onboard a sandbox other than the default, send a key for that sandbox. Real verification happens in the live account, which needs a live key or live CLI login, or a live partner app token of an app whose merchant_onboarding platform capability is active; see Onboard the live account. Which environment a credential reaches covers every credential type.
Errors#
400 INVALID_REQUESTfrom verify:param: "verification_code"means the code is wrong, andparam: "verification_token"means the token is unknown, expired, or used, so start again. Detail codeREQUIREDorINVALID_VALUEatmerchant_idmeans choose a merchant fromselectable_resources.409 LIMIT_REACHEDwith reasonverification_attempts: the token had five incorrect codes. Start again with a newIdempotency-Key.409 ALREADY_EXISTSwith reasondashboard_sign_in_requiredfrom verify: the account has two-step verification, the address is unverified on its sign-in, or the email is linked to a different Flint sign-in. Sign in withflint loginor the Dashboard.403 IDENTITY_VERIFICATION_REQUIREDfromPOST /v1/api-keys: the session is pastfresh_verification_expires_atand the key would havefullorread_onlyaccess or a step-up scope. Verify the email again, or create arestrictedkey without those scopes.404 RESOURCE_NOT_FOUNDfromPOST /v1/api-keyswithparam: "sandbox_id": no active sandbox of the merchant has that ID. Senddefault_sandbox_idfrom verify-email.409 MERCHANT_NOT_READYwith reasonaccount_setup_repair_requiredoraccount_setup_unavailable: account setup can't continue. Contact Flint support; retrying doesn't clear it.503 SERVICE_UNAVAILABLEwith reasonrepair_requiredandremediation.retry: none: onboarding isn't configured on this Flint environment. Contact Flint support with therequest_id. Without that reason, onboarding is temporarily unavailable, and the same request can be sent again.429 RATE_LIMIT_EXCEEDED: a setup throttle, or 20 incorrect codes for one email within an hour. Wait forRetry-After, and run signup once per merchant and store the key.
For every case, see Signup errors and Onboarding errors in the onboarding guide.
Related guides#
API & agent onboardingEvery signup and onboarding call with examples, the embedded verification step, and live onboarding.Merchant account sessionsMount the embedded component, refresh its client secret, and handle retries.MerchantsReadiness, next actions, and the requirement codes the processor can ask for later.Advance onboarding flow#
/v1/onboarding/advanceIdempotentRequires scope merchants.onboarding.write
Rate limit: external_provider_action
Submits whatever the caller currently knows, re-evaluates onboarding, reconciles onboarding requirements, and returns the next step in the consolidated onboarding state machine. Send an empty JSON object when the current next_step only asks to refresh onboarding requirements. The credential selects the environment; the onboarding session token acts in the merchant's default sandbox. A partner install token can't send profile.email, and in live mode works 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.
Request body
countryenumISO 3166-1 alpha-2 country code.
US
profileobjectContact and website details to record for onboarding. Send only the fields to change. Profile changes return `409 ACTION_NOT_ALLOWED` with reason `managed_externally` while the account is being set up. Once the account is active, support contact and website details can change; changing the email address still returns this error.
emailstring or nullSend null to clear it.
support_emailstring or nullBuyers see this address on receipts and in their account. A support email is required before initial live activation. Existing live merchants may clear it and receive a nonblocking prompt to add one. Send null to clear it.
support_phonestring or nullSend null to clear it.
support_urlstring or nullSend null to clear it.
website_urlstring or nullSend null to clear it.
requested_capabilitiesarray of enumExact initial Flint capability set. Include accept_card_payments and receive_payouts together. Optionally include accept_ach_debit_payments, or omit the field to use the card and payout default set.
accept_card_paymentsreceive_payoutsaccept_ach_debit_payments
Response · 200
The updated onboarding state.
dataobjectRequiredResource, collection, or operation result returned by this request.
countryenumBusiness country Flint uses in the selected environment. Before account setup, this is the selected country or the country Flint would use if advance omits it. Omitted when Flint cannot determine a country. Once account setup selects a country, it cannot change. Uses ISO 3166-1 alpha-2 country codes.
US
default_sandbox_idstringID of the merchant's default sandbox. Omitted when the merchant has no default sandbox.
merchant_idstringRequiredID of the merchant this resource belongs to.
next_stepobjectThe step to take next. Omitted when no step is pending, such as while Flint prepares the sandbox.
profileobjectRequiredContact and website details recorded for onboarding.
requested_capabilitiesarray of enumCanonical Flint capability intent persisted on the selected stable provider-account target. The initial merchant-account configuration always includes accept_card_payments and receive_payouts and may also include accept_ach_debit_payments.
accept_card_paymentsreceive_payoutsaccept_ach_debit_payments
statusenumRequiredOnboarding workflow status for activation and remediation, not a durable account-readiness boolean.
completewaiting_for_reviewneeds_external_actionneeds_input
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/advance \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"country": "US",
"profile": {
"support_email": "help@example.com",
"website_url": "https://withflintpay.com"
},
"requested_capabilities": [
"accept_card_payments",
"receive_payouts"
]
}'Start onboarding flow#
/v1/onboarding/startIdempotentNo API key required
Rate limit: per IP
Starts the consolidated onboarding flow by accepting a verification email for asynchronous delivery and returning a temporary verification token. Success does not confirm email delivery.
Request body
business_namestringBusiness name buyers see. Applied only when verification creates a merchant; existing merchants keep their profile. Surrounding whitespace is trimmed.
emailstringRequiredEmail address to verify. Flint emails a verification code to it.
first_namestringRequiredFirst name of the person signing up.
last_namestringRequiredLast name of the person signing up.
support_emailstringSupport email shown to buyers. Applied only to a newly created merchant.
support_phonestringSupport phone shown to buyers, in E.164 format. Applied only to a newly created merchant.
support_urlstringSupport URL shown to buyers. Applied only to a newly created merchant.
timezonestringIANA business time zone for a newly created merchant, such as America/Chicago. Used for reports and business dates. Omit to leave it unset. Existing merchants keep their time zone.
website_urlstringPublic business website URL. Applied only to a newly created merchant.
Response · 200
The verification email was accepted for asynchronous delivery. This response does not confirm delivery; it returns the verification token and its expiry.
dataobjectRequiredResource, collection, or operation result returned by this request.
expires_atstringRequiredTime the email verification expires. Start onboarding again to request a new code after this time.
verification_tokenstringRequiredToken identifying the email verification. Send it with the emailed code to POST /v1/onboarding/verify-email.
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/start \
-H "Flint-Version: 2026-09-07" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"email": "owner@example.com",
"first_name": "Jane",
"last_name": "Doe"
}'Get onboarding state#
/v1/onboarding/stateRequires scope merchants.onboarding.read or merchants.onboarding.write
Rate limit: read
Returns the consolidated onboarding state machine, including the primary next step for agents or humans. This endpoint is read-only. The credential selects the environment; the onboarding session token acts in the merchant's default sandbox.
curl https://api.withflintpay.com/v1/onboarding/state \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The current onboarding state.
{
"data": {
"country": "US",
"default_sandbox_id": "test_01KEZF7C00EWKVN1WYFT3YJSS5",
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"next_step": {
"action_type": "create_merchant_account_session",
"merchant_account_session": {
"collection_strategy": "incremental",
"components": [
"account_onboarding"
],
"future_requirements": "omit"
},
"owner": "integrator"
},
"profile": {
"email": "owner@example.com",
"support_email": "help@example.com",
"support_phone": "+14155552671",
"support_url": "https://example.com/support",
"website_url": "https://withflintpay.com"
},
"requested_capabilities": [
"accept_card_payments",
"receive_payouts"
],
"status": "needs_external_action"
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6FP8GGHAF5CSF8XWYHEDH"
}Verify onboarding email#
/v1/onboarding/verify-emailIdempotentNo API key required
Rate limit: per IP
Verifies the emailed code, provisions the Flint user and merchant if needed, and returns an onboarding session token. The token expires at onboarding_session_expires_at and cannot be refreshed. Verify the email again to get a new one. Read GET /v1/onboarding/state next.
Request body
merchant_idstringID of the merchant this resource belongs to.
verification_codestringRequiredThe code Flint emailed to the address you sent to `POST /v1/onboarding/start`.
verification_tokenstringRequiredThe `verification_token` that `POST /v1/onboarding/start` returned.
Response · 200
The verified onboarding session.
dataobjectRequiredResource, collection, or operation result returned by this request.
default_sandbox_idstringID of the merchant's default sandbox for testing API calls. Omitted when the merchant has no default sandbox.
fresh_verification_expires_atstringRequiredThe last instant this session counts as freshly verified, five minutes after verification. Afterward, it can grant only restricted keys with these scopes: commerce.products.read, commerce.subscription_plans.read, commerce.bundles.read, commerce.catalog.read. Verify your email again to grant more access.
merchantobjectRequiredThe merchant the onboarding session acts for, whether newly provisioned or already associated with the user. Its readiness describes the default sandbox identified by default_sandbox_id, matching GET /v1/merchant with this onboarding session.
onboarding_session_expires_atstringRequiredExpiry of onboarding_session_token. The token cannot be refreshed; verify the email again to get a new one.
onboarding_session_tokenstringRequiredBearer token for the verified user's onboarding session. Keep it secret and send it in the Authorization header for subsequent onboarding calls.
userobjectRequiredThe user signed in by the verified email address.
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/verify-email \
-H "Flint-Version: 2026-09-07" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"verification_code": "482193",
"verification_token": "example"
}'Was this helpful?