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.

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/onboarding/api-key takes the onboarding session 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#

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 state
  • complete
    Onboarding is finished and the first key exists. 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 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: send country, requested_capabilities, and profile to POST /v1/onboarding/advance. Names in required_fields, such as website_url, are fields of profile. 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.
  • create_api_key: send a name to POST /v1/onboarding/api-key. It appears only when nothing else is left and can_issue_api_key is true.
  • 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

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_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 from verify: the email is linked to a different Flint sign-in, so sign in with flint login or the dashboard. From POST /v1/onboarding/api-key: the merchant already has an API key.
  • 403 IDENTITY_VERIFICATION_REQUIRED from POST /v1/onboarding/api-key: more than 5 minutes passed since verification and the key would hold accounts.api_keys.write. Verify the email again, or leave that scope out.
  • 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.

Request body

countryenum

ISO 3166-1 alpha-2 country code.

  • US
profileobject

Contact and website details you submit for a merchant during onboarding. Send null to clear a field.

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"
    ]
  }'

Create onboarding API key#

POST/v1/onboarding/api-keyIdempotent

Requires 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

namestringRequired
scopesarray of string

Response · 201

The created external API key. secret_key is only returned once.

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

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

emailstringRequired
first_namestringRequired
last_namestringRequired

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

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
verification_tokenstringRequired

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?