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

# Web SDK configuration reference

> All options for window.getidWebSdk.init.

```javascript theme={null}
window.getidWebSdk.init(config);
```

## Options

<table>
  <colgroup>
    <col width="209" />

    <col width="100" />

    <col width="325" />
  </colgroup>

  <thead>
    <tr>
      <th>Option</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**`apiUrl`** required</td>
      <td>`string`</td>
      <td>Environment URL, for example `https://partner.sb.getid.dev` or `https://partner.getid.ee`</td>
    </tr>

    <tr>
      <td>**`jwt`** required</td>
      <td>`string`</td>
      <td>Session token from `POST /sdk/v2/token`. During development, `sdkKey` works instead.</td>
    </tr>

    <tr>
      <td>**`containerId`** required</td>
      <td>`string`</td>
      <td>ID of the HTML element to render the flow in</td>
    </tr>

    <tr>
      <td>**`flowName`** required</td>
      <td>`string`</td>
      <td>Flow name from the Backoffice</td>
    </tr>

    <tr>
      <td>**`locale`**</td>
      <td>`string`</td>
      <td>Language code, for example `en`, `de` or `ar_SA`. See [Localization](https://docs.checkin.com/integrate/localization.md#supported-languages) for all codes.</td>
    </tr>

    <tr>
      <td>**`dictionary`**</td>
      <td>`string`</td>
      <td>Name of a custom translation dictionary. See [Localization](https://docs.checkin.com/integrate/localization.md#custom-translations).</td>
    </tr>

    <tr>
      <td>**`themeMode`**</td>
      <td>`string`</td>
      <td>Theme to use when the flow has Light & Dark themes, for example `light`. See [Flows](https://docs.checkin.com/backoffice/flows.md#visual-appearance).</td>
    </tr>

    <tr>
      <td>**`metadata`**`.externalId`</td>
      <td>`string`</td>
      <td>Your customer or session ID. Not unique.</td>
    </tr>

    <tr>
      <td>**`metadata`**`.labels`</td>
      <td>`object`</td>
      <td>Up to 30 string key-value pairs</td>
    </tr>

    <tr>
      <td>**`profile`**</td>
      <td>`array`</td>
      <td>Known applicant data as `{ category, value }` items, for cross-checking and prefilling. See [Applicant data](https://docs.checkin.com/integrate/applicant-data.md#profile-data).</td>
    </tr>

    <tr>
      <td>**`address`**`.country`</td>
      <td>`string`</td>
      <td>Expected address for [Proof of Address](https://docs.checkin.com/products/proof-of-address.md). ISO alpha-3.</td>
    </tr>

    <tr>
      <td>**`address`**`.postcode`</td>
      <td>`string`</td>
      <td>Postcode</td>
    </tr>

    <tr>
      <td>**`address`**`.addressLine`</td>
      <td>`string`</td>
      <td>Street and number</td>
    </tr>

    <tr>
      <td>**`address`**`.city`</td>
      <td>`string`</td>
      <td>City</td>
    </tr>

    <tr>
      <td>**`acceptableDocuments`**</td>
      <td>`function`</td>
      <td>Narrows the flow's accepted documents for this session. Returns the countries and document types to accept, as `{ country, documentTypes }[]`. See [Accepted documents per session](https://docs.checkin.com/integrate/applicant-data.md#accepted-documents-per-session).</td>
    </tr>
  </tbody>
</table>

## Callbacks

<table>
  <colgroup>
    <col width="222" />

    <col width="182" />

    <col width="325" />
  </colgroup>

  <thead>
    <tr>
      <th>Callback</th>
      <th>Receives</th>
      <th>Called when</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**`onComplete`**</td>
      <td>`{ applicationId }`</td>
      <td>The applicant has submitted everything. With `onVerificationComplete` set, after processing is done.</td>
    </tr>

    <tr>
      <td>**`onFail`**</td>
      <td>`{ code, message }`</td>
      <td>The flow can't continue</td>
    </tr>

    <tr>
      <td>**`onClose`**</td>
      <td>`{ code, message }`</td>
      <td>The applicant clicks the close button. Setting this callback shows the button.</td>
    </tr>

    <tr>
      <td>**`onTrackEvent`**</td>
      <td>`object`</td>
      <td>Each step and error, for analytics</td>
    </tr>

    <tr>
      <td>**`onBack`**</td>
      <td>Nothing</td>
      <td>The applicant clicks the back button on the first screen. Setting this callback shows the button.</td>
    </tr>

    <tr>
      <td>**`onVerificationComplete`**</td>
      <td>The verification result</td>
      <td>Processing is done, while the applicant is on the wait screen. Setting it makes the SDK wait for the result before it finishes.</td>
    </tr>
  </tbody>
</table>

See [Callbacks and events](https://docs.checkin.com/integrate/web-sdk/events.md) for details.

## Full example

```javascript theme={null}
window.getidWebSdk.init({
  apiUrl: 'https://partner.sb.getid.dev',
  jwt: sessionToken,
  containerId: 'checkin-component',
  flowName: 'ID-Selfie-Liveness',
  locale: 'en',
  dictionary: 'my-dictionary',
  themeMode: 'light',
  metadata: {
    externalId: 'customer-123',
    labels: { journey: 'account-opening' },
  },
  profile: [
    { category: 'First name', value: 'Alex' },
    { category: 'Last name', value: 'Example' },
    { category: 'Date of birth', value: '1990-01-20' },
  ],
  onComplete: ({ applicationId }) => notifyBackend(applicationId),
  onFail: ({ code, message }) => showError(code, message),
  onClose: () => goBack(),
  onTrackEvent: (event) => analytics.track('verification_event', event),
});
```


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