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.
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/onboarding/api-keytakes the onboarding session 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#
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. 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. The onboarding guide lists the routes it authenticates.
The first key. POST /v1/onboarding/api-key works only while the merchant has no API key. It issues a key bound to the default sandbox and returns secret_key only in that response. You can issue it before the merchant finishes verification. Without scopes, the key gets the full starter set; send a subset to narrow it. A key that holds accounts.api_keys.write, which the starter set includes, can be issued only within 5 minutes of email verification. Issue the key right after verifying, or leave that scope out of scopes.
Onboarding state#
status on onboarding statecompleteOnboarding is finished and the first key exists. 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 or issuing the first key.
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: sendcountry,requested_capabilities, andprofiletoPOST /v1/onboarding/advance. Names inrequired_fields, such aswebsite_url, are fields ofprofile. 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.create_api_key: send anametoPOST /v1/onboarding/api-key. It appears only when nothing else is left andcan_issue_api_keyistrue.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 |
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; 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_EXISTSfrom verify: the email is linked to a different Flint sign-in, so sign in withflint loginor the dashboard. FromPOST /v1/onboarding/api-key: the merchant already has an API key.403 IDENTITY_VERIFICATION_REQUIREDfromPOST /v1/onboarding/api-key: more than 5 minutes passed since verification and the key would holdaccounts.api_keys.write. Verify the email again, or leave that scope out.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.
Request body
countryenumISO 3166-1 alpha-2 country code.
US
profileobjectContact and website details you submit for a merchant during onboarding. Send null to clear a field.
emailstring or nullSend null to clear it.
support_emailstring or nullSend 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.
can_issue_api_keybooleanRequiredcountryenumImmutable business country for the selected stable provider-account target. Omitted until the target has selected an effective country. Uses ISO 3166-1 alpha-2 country codes.
US
default_sandbox_idstringmerchant_idstringRequiredID of the merchant this resource belongs to.
next_stepobjectA step that moves a merchant capability or readiness axis forward, with the party that must do it (`owner`) and any required fields.
profileobjectRequiredContact and website details recorded for a merchant during 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"
]
}'Create onboarding API key#
/v1/onboarding/api-keyIdempotentRequires an onboarding session
Rate limit: sensitive_write
Creates the first long-lived sandbox API key. The credential selects the environment; the onboarding session token acts in the merchant's default sandbox.
Request body
namestringRequiredscopesarray of stringResponse · 201
The created external API key. secret_key is only returned once.
dataobjectRequiredResource, collection, or operation result returned by this request.
secret_keystringRequiredOne-time secret returned only when the API key is created.
accessenumRequiredKey access. Full and read_only resolve from the current scope catalog for the key's mode; restricted holds only its listed scopes. Granting full or read_only requires a freshly verified authorized user session or a full-access API key.
fullread_onlyrestricted
api_key_idstringRequiredUnique identifier for this api key, prefixed `key_`.
created_atstringRequiredRFC3339 timestamp.
created_byobjectThe API key or user that created this key. An API key creator can belong to another mode, such as a live key that creates a sandbox key. Absent when the creator is unavailable.
expires_atstringRFC3339 timestamp.
key_prefixstringRequiredlast_used_atstringRFC3339 timestamp.
merchant_idstringRequiredID of the merchant this resource belongs to.
namestringRequiredpartner_app_install_idstring or nullRequiredThe connected app install this key is linked to. The key is revoked when that install is revoked or loses its grant for this key's environment. Null when the key is unlinked. Never changes.
revoked_atstringWhen this key was revoked, in RFC 3339 format. Present only for revoked keys. For keys revoked before revocation timestamps were recorded, this is the last update time.
sandbox_idstringID of the sandbox this resource belongs to.
scopesarray of enumRequiredThe scopes the key holds now. For full and read_only keys this list grows when Flint adds scopes.
accounts.api_keys.readaccounts.api_keys.writeaccounts.devices.readaccounts.devices.writeaccounts.organizations.readaccounts.organizations.writeaccounts.workload_identities.readaccounts.workload_identities.writeanalytics.readcheckouts.checkout_sessions.readcheckouts.checkout_sessions.writecheckouts.payment_links.readcheckouts.payment_links.writecommerce.bundles.readcommerce.bundles.writecommerce.catalog.readcommerce.catalog.writecommerce.credit_notes.readcommerce.credit_notes.writecommerce.delivery.readcommerce.delivery.writecommerce.gift_cards.adjustments.writecommerce.gift_cards.readcommerce.gift_cards.redemptions.writecommerce.gift_cards.secrets.writecommerce.gift_cards.writecommerce.inventory.allocation.writecommerce.inventory.policies.writecommerce.inventory.readcommerce.inventory.writecommerce.invoices.readcommerce.invoices.writecommerce.orders.readcommerce.orders.writecommerce.products.readcommerce.products.writecommerce.promotions.readcommerce.promotions.writecommerce.refunds.readcommerce.refunds.tax_overrides.writecommerce.refunds.writecommerce.returns.operations.writecommerce.returns.policies.writecommerce.returns.readcommerce.returns.reasons.writecommerce.returns.resolutions.writecommerce.returns.writecommerce.subscription_plans.readcommerce.subscription_plans.writecommerce.subscriptions.readcommerce.subscriptions.writecustomers.readcustomers.sessions.writecustomers.writedeveloper.feedback_reports.readdeveloper.feedback_reports.writedeveloper.partner_apps.readdeveloper.partner_apps.writedeveloper.request_logs.readdeveloper.request_logs.self.readdeveloper.resource_timelines.readdeveloper.sandboxes.readdeveloper.sandboxes.writedeveloper.test_clocks.readdeveloper.test_clocks.writemerchant_billing.readmerchants.account_sessions.writemerchants.locations.readmerchants.locations.writemerchants.onboarding.readmerchants.onboarding.writemerchants.profile.readmerchants.profile.writemoney_movement.balance_transactions.readmoney_movement.balances.readmoney_movement.payout_settings.readmoney_movement.payout_settings.writemoney_movement.payouts.readmoney_movement.payouts.writepayments.disputes.readpayments.disputes.writepayments.payment_intents.readpayments.payment_intents.writepayments.payment_method_domains.readpayments.payment_method_domains.writepayments.payment_methods.readpayments.payment_methods.writereports.readreports.writerisk.controls.writerisk.readrisk.reviews.writesettings.readsettings.writewebhooks.readwebhooks.write
statusenumRequiredCurrent key status. A non-revoked key is expired when expires_at is at or before the current time; otherwise it is active. Revoked keys remain revoked regardless of expires_at.
activeexpiredrevoked
supported_actionsarray of enumRequiredLifecycle actions Flint accepts now. Active and expired keys can be revoked; revoked keys accept none.
revoke
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
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/api-key \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_ONBOARDING_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"name": "First backend integration",
"scopes": [
"commerce.orders.read",
"commerce.orders.write",
"customers.read",
"customers.write"
]
}'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
emailstringRequiredfirst_namestringRequiredlast_namestringRequiredResponse · 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": {
"can_issue_api_key": true,
"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_codestringRequiredverification_tokenstringRequiredResponse · 200
The verified onboarding session.
dataobjectRequiredResource, collection, or operation result returned by this request.
can_issue_api_keybooleanRequiredWhether the merchant has no external API key and a default sandbox exists.
default_sandbox_idstringID of the merchant's default sandbox for testing API calls. Omitted when the merchant has no default sandbox.
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?
