Skip to content

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.

  1. Start. POST /v1/onboarding/start takes no credential. It emails a verification code and returns a verification_token that expires in 15 minutes.
  2. Verify. POST /v1/onboarding/verify-email takes no credential. It checks the code, creates the user, merchant, and default sandbox if they don't exist, and returns an onboarding_session_token.
  3. Issue the first key. POST /v1/api-keys takes the onboarding session, access, and the default sandbox's sandbox_id, and returns the merchant's first sandbox key.
  4. Run the loop. GET /v1/onboarding/state returns status and the single next_step. POST /v1/onboarding/advance submits 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 state
  • complete
    Onboarding is finished, whether or not the merchant has an API key. Requirements that come up later appear in merchant readiness.
  • waiting_for_review
    Flint or the payment processor is reviewing what the owner submitted. Read the state again later, and don't create another account session.
  • needs_external_action
    The account owner must complete a step in the embedded component. next_step is create_merchant_account_session.
  • needs_input
    Your 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 in required_fields to POST /v1/onboarding/advance. For example, country is a top-level field and profile.website_url goes inside profile. If the state already includes country, Flint can use that value when you omit it from the request. You can also send requested_capabilities to choose the initial capability set. The response is the new state.
  • create_merchant_account_session: send merchant_account_session unchanged as the body of POST /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.

CredentialReaches
Onboarding session tokenThe 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 tokenThe 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_REQUEST from verify: param: "verification_code" means the code is wrong, and param: "verification_token" means the token is unknown, expired, or used, so start again. Detail code REQUIRED or INVALID_VALUE at merchant_id means choose a merchant from selectable_resources.
  • 409 LIMIT_REACHED with reason verification_attempts: the token had five incorrect codes. Start again with a new Idempotency-Key.
  • 409 ALREADY_EXISTS with reason dashboard_sign_in_required from 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 with flint login or the Dashboard.
  • 403 IDENTITY_VERIFICATION_REQUIRED from POST /v1/api-keys: the session is past fresh_verification_expires_at and the key would have full or read_only access or a step-up scope. Verify the email again, or create a restricted key without those scopes.
  • 404 RESOURCE_NOT_FOUND from POST /v1/api-keys with param: "sandbox_id": no active sandbox of the merchant has that ID. Send default_sandbox_id from verify-email.
  • 409 MERCHANT_NOT_READY with reason account_setup_repair_required or account_setup_unavailable: account setup can't continue. Contact Flint support; retrying doesn't clear it.
  • 503 SERVICE_UNAVAILABLE with reason repair_required and remediation.retry: none: onboarding isn't configured on this Flint environment. Contact Flint support with the request_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 for Retry-After, and run signup once per merchant and store the key.

For every case, see Signup errors and Onboarding errors in the onboarding guide.

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#

POST/v1/onboarding/advanceIdempotent

Requires 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

countryenum

ISO 3166-1 alpha-2 country code.

  • US
profileobject

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

requested_capabilitiesarray of enum

Exact 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_payments
  • receive_payouts
  • accept_ach_debit_payments

Response · 200

The updated onboarding state.

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

POST/v1/onboarding/startIdempotent

No 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_namestring

Business name buyers see. Applied only when verification creates a merchant; existing merchants keep their profile. Surrounding whitespace is trimmed.

emailstringRequired

Email address to verify. Flint emails a verification code to it.

first_namestringRequired

First name of the person signing up.

last_namestringRequired

Last name of the person signing up.

support_emailstring

Support email shown to buyers. Applied only to a newly created merchant.

support_phonestring

Support phone shown to buyers, in E.164 format. Applied only to a newly created merchant.

support_urlstring

Support URL shown to buyers. Applied only to a newly created merchant.

timezonestring

IANA 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_urlstring

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

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

GET/v1/onboarding/state

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

Response · 200

The current onboarding state.

Same response as Advance onboarding flow.

curl https://api.withflintpay.com/v1/onboarding/state \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

The current onboarding state.

JSON
{
  "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#

POST/v1/onboarding/verify-emailIdempotent

No 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_idstring

ID of the merchant this resource belongs to.

verification_codestringRequired

The code Flint emailed to the address you sent to `POST /v1/onboarding/start`.

verification_tokenstringRequired

The `verification_token` that `POST /v1/onboarding/start` returned.

Response · 200

The verified onboarding 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/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?