> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frankieone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring a Journey

> Self-serve configuration in your own code — screen toggles, branding, attempt budget, and pass-through options for the form module.

This page groups `journey()` options by what they control — screens, branding, attempts, and verification
timing — rather than listing them flow by flow. For the exhaustive option table, including types and
defaults, see the [Journey reference](/docs/sdk-reference/journey#options).

Everything on this page is set in your own code and ships with your app — there's no request to
FrankieOne to change it. The journey still owns the verification flow itself, so this configuration can
reshape how it looks and reads, but it cannot break the underlying verification behaviour.

## Screens

`withStart`, `withWelcome`, `withConsent`, and `withReview` toggle optional screens on. All four are **off
by default**. `withResult` is the exception — it toggles the terminal result screen, and is **on by
default**.

| Option | idv | ocr | ekyc |
| - | :-: | :-: | :-: |
| `withStart`, `withWelcome`, `withConsent` | yes | yes | yes |
| `withReview` | yes | yes | no — review always mounts |
| `withResult` | yes | yes | yes |

eKYC always mounts the review screen, so `withReview` has no effect there. The `review` configuration
(see [pass-through configuration](#pass-through-configuration) below) still applies on eKYC — the screen
just can't be switched off.

`withResult` is opt-out, unlike the other three toggles above: the terminal result screen already
renders today, so defaulting it off would be a silent breaking change for every existing integration.
Set it to `false` and the host owns the ending instead — `start()` resolves as soon as the outcome is
known, nothing is mounted, and the container is emptied on settlement, so you can reuse the element
immediately without calling `destroy()` yourself. It governs the terminal screen only — the `PARTIAL`
data-correction retry card (see [Result screens](#result-screens) below) is part of the review path and
is disabled with `withReview: false`, not this option.

```javascript theme={null}
oneSdk.journey(JourneyName.IDV, {
  container,
  withWelcome: true,
  withConsent: true,
  withReview: true,
});
```

## Branding

The `style` object controls the visual identity of the mounted flow:

| Token | Restyles |
| - | - |
| `primaryColor` | Button background, checkbox accent, instruction icons, edit button |
| `secondaryColor` | Loader and loading indicator colours |
| `fontFamily` | The form and its inputs |
| `logo` | The logo on journey screens |

`style.logo` takes precedence over a top-level `logo` — set both and `style.logo` wins.

These rules are scoped to the mount element and reverted on teardown, so a journey is safe to mount
inside an existing design system without leaking styles onto the rest of the page.

```javascript theme={null}
oneSdk.journey(JourneyName.IDV, {
  container,
  style: {
    primaryColor: '#1A6CFF',
    secondaryColor: '#3DD892',
    fontFamily: 'Inter, sans-serif',
    logo: 'https://example.com/logo.svg',
  },
});
```

## Attempts

`maxAttempts` sets the retry budget. It defaults to `3` — one attempt plus two data corrections.

Exhausting the budget settles the journey with `declined / attempts_exhausted`. That's a decline, not
an error — check `result.outcome` and `result.reason` rather than expecting a thrown or `error` result.
Retries are internal to the journey; the host never loops on `start()` itself.

## Verification

`triggerVerificationOnSubmit` controls whether the journey submits for verification itself. It applies
to **idv and ocr only**.

Setting it to `false` means the journey never calls submit: it captures, saves the data against the
entity, and settles `success / captured` so you can run verification yourself, server-side, on your own
schedule. The `verifying` loading screen ([Pass-through configuration](#pass-through-configuration)
below) only ever covers a submit that actually runs — with `false`, there is no submit to cover, so
that screen is skipped entirely.

It does not apply to ekyc, and TypeScript rejects it there. The ekyc review screen does its own
submit-and-verify, so there is no separate submit for the flag to switch off.

## Result screens

`result` carries the form module's own RESULT configuration, keyed by which card is showing. Name
only the states you want to change, and only the keys you want to replace — everything else keeps
the SDK's default.

```js theme={null}
result: {
  SUCCESS: { title: { label: 'You’re verified' }, cta: { label: 'Continue' } },
  TIMEOUT: { title: { label: 'Your session expired' } },
}
```

The six keys are `SUCCESS`, `PENDING`, `FAIL`, `PROVIDER_ERROR`, `TIMEOUT` and `PARTIAL`. The first
five are endings. `PARTIAL` is the data-correction retry card, shown mid-journey — it is not
affected by `withResult`, and its CTA is always visible because clicking it is what starts the retry.

`state` is the journey's to set: the outcome decides which card renders, so a `state` key in your
config is ignored.

### CTAs change when the journey settles

Without a `cta`, a card is non-interactive and `start()` resolves as soon as it renders. Give a
state a `cta` and that state resolves on the click instead — so `result: { SUCCESS: { cta } }` means
a successful journey waits for the applicant to acknowledge it, while a declined one still resolves
on render. Configure a CTA on every state you want that behaviour on.

## Pass-through configuration

Nine keys are forwarded verbatim to the form module — the journey does not read, validate, or reshape
them. Each one is documented in full on [Form module: Configuration](/docs/sdk-reference/form-module/configuration),
never here.

| Key | Applies to | Documented in |
| - | - | - |
| `start`, `welcome`, `consent` | all flows | [Form module](/docs/sdk-reference/form-module/configuration) |
| `review` | all flows | [Form module](/docs/sdk-reference/form-module/configuration) |
| `personal`, `document`, `retry` | ekyc | [Form module](/docs/sdk-reference/form-module/configuration) |
| `captureLoader`, `verifying` | idv, ocr | [Form module](/docs/sdk-reference/form-module/configuration) |

`review` in particular keeps its own per-country and per-state structure. The journey forwards it
verbatim — it is never flattened or translated on the way through.

## Full option reference

For the complete `JourneyOptions` table — every option, its type, and its default — see
[Journey reference: Options](/docs/sdk-reference/journey#options).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.