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

# Journey Quick Start

> Mount a complete, pre-assembled verification flow in your own page with one call.

`journey()` mounts a complete, pre-assembled verification flow into an element you own. This page gets one running.

## Requirements

* A **Customer ID** and **API Key** from the FrankieOne portal
* A backend endpoint that issues [session tokens](/docs/sdk-reference/session-management) — or, for a local run only, the development shortcut below
* OneSDK loaded via UMD or the `@frankieone/one-sdk` package
* A recipe configured at `OneSdk({ recipe })`, including `recipe.form` — every journey reads its module
  configuration from there, not from `JourneyOptions`. See [SDK Initialization](/docs/sdk-reference/sdk-initialization)
  for the recipe shape.

<Note>
  `journey()` requires OneSDK **v1.10.0** or later.
</Note>

## Add a container

Give the flow an element to mount into:

```html theme={null}
<div id="verify"></div>
```

Keep this element dedicated to the journey. It empties the element when it tears down, so anything else you render inside it goes too.

## Mint a session token

OneSDK authenticates with a session token. In production your **backend** mints it and your frontend
receives only the token — see [Session Management](/docs/sdk-reference/session-management) and the
worked backend example in [SDK Initialization](/docs/sdk-reference/sdk-initialization#generating-session-tokens).

To get a journey running on your own machine in a single file, you can mint one straight from the
browser against your UAT environment:

<Warning>
  **Never ship this.** The snippet below puts your **Customer ID and API Key in client-side code**,
  where anyone who opens devtools can read them and mint their own sessions against your account.

  It exists so you can see a journey run end to end without standing up a backend first. Move token
  minting to your server before this code goes anywhere near a real user.
</Warning>

```javascript theme={null}
// DEVELOPMENT ONLY — read the warning above. This belongs on your backend in production.
const response = await fetch(
  'https://backend.kycaml.uat.frankiefinancial.io/auth/v2/machine-session',
  {
    method: 'POST',
    headers: {
      authorization: 'machine ' + btoa('<CUSTOMER_ID>:<CUSTOMER_CHILD_ID>:<API_KEY>'),
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      permissions: {
        preset: 'one-sdk',
        reference: 'quickstart-' + Date.now(),
      },
    }),
  },
);

const session = await response.json();
```

The response carries `token` and `session_id`. Only `token` is needed to start a journey.

## Start the journey

```javascript theme={null}
import OneSdk, { JourneyName } from '@frankieone/one-sdk';

const oneSdk = await OneSdk({ session: { token: session.token } });

const result = await oneSdk
  .journey(JourneyName.IDV, { container: document.getElementById('verify') })
  .start();

switch (result.outcome) {
  case 'success':   return grantAccess();
  case 'pending':   return awaitWebhook();
  case 'declined':  return reject(result.reason);
  case 'abandoned': return resume();
  case 'error':     return retryOrSupport(result.error);
}
```

## What your applicant sees

An IDV journey mounted with no further setup walks the applicant through, in order: capture, extraction, verifying, then result. The start, welcome, consent, and review screens are off by default — turn them on in [configuration](/docs/embedded-flows/journey/configuration).

## What start() guarantees

`start()` settles exactly once and **never rejects** — every ending, failure included, arrives as a resolved `JourneyResult`, so the happy path needs no `try/catch`. The two pre-flight errors are thrown by `journey()` itself, before a handle exists, so wrap that call if you want to catch them. Retries are internal and never surface as an outcome to loop on.

## Next

<CardGroup cols={3}>
  <Card title="IDV Journey" icon="id-card" href="/docs/embedded-flows/journey/idv">
    Document and biometric capture, screen order, and applicable options.
  </Card>

  <Card title="OCR Journey" icon="file-lines" href="/docs/embedded-flows/journey/ocr">
    Document capture and extraction without biometrics.
  </Card>

  <Card title="eKYC Journey" icon="user-check" href="/docs/embedded-flows/journey/ekyc">
    Manual form entry for personal details and documents.
  </Card>

  <Card title="Results" icon="flag-checkered" href="/docs/embedded-flows/journey/results">
    The outcome contract your app branches on.
  </Card>

  <Card title="Configuration" icon="sliders" href="/docs/embedded-flows/journey/configuration">
    Every option, organized by what it controls.
  </Card>
</CardGroup>


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