# Modules

A module is a self-contained step in an onboarding flow. Add modules to an `OnboardingFlowConfiguration` (for [locally configured flows](./flutter-configure-flows-locally-and-run-end-to-end)) to define what happens during onboarding, or configure them in a Flow or Workflow in Dashboard (for [online-configured flows](./flutter-run-flows-configured-online)).

All the modules supported by the Flutter SDK are listed here, with their configuration parameters. For implementation options and instructions, see [Common Implementation Patterns](./flutter-common-implementation-patterns).

Add modules to an `OnboardingFlowConfiguration` using the corresponding `add` method:

```dart
flowConfig.addIdScan();
flowConfig.addSelfieScan();
```

Modules execute in the order they are added. To skip a module, omit its `add` call.

For completion payloads, update events, and module error examples, see [Results](./flutter-results).

### Aes (Advanced Electronic Signature)

**Module ID:** `AES`

Shows the user documents to sign, collects their consent, and captures a certificate-backed electronic signature. That digital certificate verifies their identity, making the signed document legally binding and compliant.

- `uploadDocument` (optional, defaults to `false`): bool?. If `true`, the module shows the AES upload screen before the normal AES screens.
- `downloadDocument` (optional, defaults to `false`): bool?. If `true`, the module downloads signed PDFs and shows the Confirmed Signature Details screen at the end of the AES flow.

### Antifraud

**Module ID:** `ANTIFRAUD`

Compares the current Session against prior Sessions and known identities to detect signs of fraud.

- No additional parameters.

### Approve

**Module ID:** `USER_APPROVAL`

Finalizes an onboarding flow by deciding whether to approve the user, then registers approved users in the Incode database. By default, it runs with no UI and approves silently, but you can toggle the UI, silent face match, and forced approval.

- `forceApproval` (optional, defaults to `false`): bool?. If `true`, the user is approved regardless of score. Force-approved users still receive a valid `Approve` result and `customerUUID`. The SDK does not attach a flag to the result indicating force approval; whether the backend logs force-approved sessions distinctly is outside the SDK's scope. Regulated customers should contact their Incode representative for details on backend audit trails.

### Captcha

**Module ID:** `OTP`

Presents a CAPTCHA challenge during onboarding to verify human interaction and reduce automated abuse. Returns the user's response to your app.

- No additional parameters.

### CombinedConsent

**Module ID:** `COMBINED_CONSENT`

Asks the user for data sharing consent.

- `consentId` (required): String. The ID for the combined consent. You can create a consent in Dashboard at **Configuration** > **Consents**.

### CURP

**Module ID:** `CURP_VALIDATION`

Validates a person's CURP (Clave Única de Registro de Población), a personal identification number issued in Mexico, against Mexico's RENAPO registry. It accepts a CURP extracted via OCR, entered manually, or generated from personal data when the user doesn't know it.

- No additional parameters.

### CustomWatchlist

**Module ID:** `INCODE_WATCHLIST`

Screens the user's collected data, including biometric face data when available, against your organization's private watchlist of blocked or trusted users, and influences the Session outcome accordingly. It runs as a background process and isn't visible to the end user.

- No additional parameters.

### DocumentScan

**Module ID:** `DOCUMENT_CAPTURE`

Captures a supplementary document, such as a proof of address document, medical document, or bank statement. Users can upload a file or take a photo of the document with their device’s camera.

- `showTutorials` (optional, defaults to `true`): bool?. Shows a tutorial before document scan.
- `showDocumentProviderOptions` (optional, defaults to `false`): bool?. Controls whether the V1 capture flow offers file or image upload alongside the camera. Applies to the V1 UI only.
- `documentType` (optional, defaults to `DocumentType.addressStatement`): The expected document type. Possible values: `addressStatement`, `paymentProof`, `medicalDoc`, `otherDocument1`, `otherDocument2`.

### eKYB

**Module ID:** `EKYB`

Collects and verifies a business entity's identity data, such as business name, address, and tax ID.

- `checkBusinessName` (optional, defaults to `true`): bool?
- `checkAddress` (optional, defaults to `true`): bool?
- `checkTaxId` (optional, defaults to `true`): bool?

### eKYC

**Module ID:** `EKYC`

Collects and verifies a user's personal identity data against authoritative data sources. This data can include the user's name, email, address, phone, tax ID, date of birth, and nationality.

- `checkName` (optional, defaults to `true`): bool?
- `checkEmail` (optional, defaults to `true`): bool?
- `checkAddress` (optional, defaults to `true`): bool?
- `checkPhone` (optional, defaults to `true`): bool?
- `checkSsn` (optional, defaults to `true`): bool?
- `checkDob` (optional, defaults to `true`): bool?
- `checkNationality` (optional, defaults to `true`): bool?

### Email

**Module ID:** `EMAIL`

Collects a user's email address and can confirm email ownership by sending a one-time password (OTP) to that address.

- `otpVerificationEnabled` (optional): bool?. Enables one-time password verification of the entered email.

### FaceAuthentication

**Module ID:** `AUTHENTICATION`

Captures a returning user's face with their device’s camera and matches it against the face already enrolled for that user. It then returns a pass or fail result.

<Callout icon="📘" theme="info">
  ### **Not the same as Face Login**

  The `FaceAuthentication` module runs as a step inside an onboarding Flow or Workflow. To authenticate a user as a standalone capability (outside a Flow or Workflow), use [Face Login](./flutter-face-login) and its `startFaceLogin` method.
</Callout>

- `showTutorials` (optional, defaults to `true`): bool?. Shows a tutorial before face authentication.
- `autoCaptureTimeout` (optional, defaults to `16`): number?. Timeout in seconds for automatic face capture.
- `captureAttempts` (optional, defaults to `3`): number?. Number of allowed capture attempts before the step fails.
- `eyesClosedCheck` (optional, defaults to `true`): bool?. Checks whether the user's eyes are closed.
- `headCoverCheck` (optional, defaults to `true`): bool?. Checks for head coverings that may obstruct face recognition.
- `lensesCheck` (optional, defaults to `true`): bool?. Checks whether the user is wearing lenses or glasses.
- `faceMaskCheck` (optional, defaults to `true`): bool?. Checks whether the user is wearing a face mask.

### FaceMatch

**Module ID:** `FACE_MATCH`

Compares the user's selfie against their ID photo, their NFC chip photo, or both in a 3-way match. It then returns a confidence score.

Older documentation may refer to `faceMatchType` as `matchType`; the current name is `faceMatchType`.

This module must be added after the `IdScan` and `SelfieScan` modules.

- `idCategory` (optional, defaults to `primary`): `IdCategory.primary` or `IdCategory.secondary`.
- `showUserExists` (optional, defaults to `true`): bool.
- `faceMatchType` (optional): Determines which comparisons the SDK performs to verify the user's identity.

  | Value       | What it compares                                                 | Required modules                  | Assurance level                      |
  | ----------- | ---------------------------------------------------------------- | --------------------------------- | ------------------------------------ |
  | `idSelfie`  | Printed ID photo ↔ selfie                                        | `IdScan`, `SelfieScan`            | Standard                             |
  | `nfcSelfie` | NFC chip photo ↔ selfie                                          | `NFCScan`, `SelfieScan`           | Higher (chip photo is issuer-signed) |
  | `nfc3Way`   | All three: selfie ↔ chip, selfie ↔ printed ID, chip ↔ printed ID | `NFCScan`, `IdScan`, `SelfieScan` | Highest                              |

  `nfcSelfie` and `nfc3Way` require an NFC-capable document and a device with an NFC reader. Use `nfc3Way` for strict KYC/AML or high-risk onboarding where you need to verify the person, the physical document, and the chip are all mutually consistent.<br /><br />The `nfc3Way` chip-to-printed-ID comparison detects documents whose printed photo was altered but whose chip is genuine (or vice versa), which neither `idSelfie` nor `nfcSelfie` catches.

### FullName

**Module ID:** `NAME_CAPTURE`

Collects the user's name and sends it to the server. Older documentation may refer to this module as `Name`; the current name is `FullName`.

- No additional parameters.

### Geolocation

**Module ID:** `GEOLOCATION`

Requests location permission, then captures the precise physical location of the user's device, using its GPS sensor to record coordinates and location fields such as country, state, and city.

- `isSkippable` (optional, defaults to `false`): bool. Allows the step to be skipped. When `true`, skipping or denying the location permission advances the flow instead of ending the session with a permission error.

### GlobalWatchlist

**Module ID:** `WATCHLIST`

Screens the user's identity against sources of sanctions, Politically Exposed Persons (PEP) databases, and adverse media, returning any matches found across the configured sources.

- No additional parameters.

### GovernmentValidation

**Module ID:** `INE_VALIDATION`

Validates identity data extracted from a user's ID against an authoritative government registry. The process runs in the background and isn't visible to the user.

- `isBackgroundExecuted` (optional, defaults to `false`): bool?. If `true`, hides the module UI during execution.

### IdScan

**Module ID:** `ID`

Captures the front and back of a government-issued ID, with auto-capture and quality checks, and produces clean images for processing.

- `showTutorials` (optional, defaults to `true`): bool?. Shows a tutorial before ID scan.
- `idType` (optional): `IdType.id` or `IdType.passport`. If omitted, a chooser screen is displayed.
- `idCategory` (optional): `IdCategory.primary` or `IdCategory.secondary`.
- `scanStep` (optional): Separates front and back ID captures. Specify `ScanStepType.front` or `ScanStepType.back` to capture one side; `ScanStepType.both` (default) captures both and processes the ID. If you specify `front` or `back`, you must add the `ProcessId` module after the captures.
- `showRetakeScreenForManualCapture` (optional, defaults to `true`): bool?. Set to `false` to omit the photo review screen for manual captures.
- `showRetakeScreenForAutoCapture` (optional, defaults to `false`): bool?. Set to `true` to show the photo review screen for auto captures.
- `enableFrontShownAsBackCheck` (optional, defaults to `false`): bool?. If `true`, shows real-time feedback during back ID capture if the user appears to be capturing the front side again.
- `enableBackShownAsFrontCheck` (optional, defaults to `false`): bool?. If `true`, shows real-time feedback during front ID capture if the user appears to be capturing the back side.
- `enableRotationOnRetakeScreen` (optional, defaults to `true`): bool?. Set to `false` to turn off image rotation when the user enters the photo review screen.
- `autocaptureUxMode` **(deprecated)**: Does not apply in V2. In V1, specifying `IdScanAutocaptureUXMode.countdown` introduces a 3-2-1 timer before auto-capture.
- `showIDOverlay` (optional, defaults to `false`): bool?. If `true`, shows an ID overlay during capture.
- `autoCaptureBestFrameTimeout` (optional, defaults to 25 seconds): Timer that starts when an ID is first detected. If the ID is not auto-captured successfully before the timer expires, manual capture mode is activated.
- `autoCaptureNoIdTimeout` (optional, defaults to 60 seconds): Timer that starts when ID scan auto-capture starts. If no ID is detected before the timer expires, manual capture mode is activated.
- `streamFrames` (optional, defaults to `false`): bool. Enables streaming of the camera feed. Requires the SDK `-vc` variant. See [SDK variants](./flutter-installation#sdk-variants).
- `showIdTypeChooser` (optional): bool?. If `true`, displays the ID type chooser screen to the user.

### MLConsent

**Module ID:** `ML_CONSENT`

Captures the user's consent to process their biometric data for machine-learning purposes. It records their response on the server. You choose the consent text variant (US or GDPR style) that matches your compliance needs.

- `type` (required): `MLConsentType.gdpr` or `MLConsentType.us`.

### NFCScan

**Module ID:** `NFC_SCAN`

Reads the secure NFC chip embedded in ICAO 9303-compliant travel documents, such as e-passports. It then returns the document holder's data, including the chip's portrait image.

- `idType` (optional): `IdType.id` or `IdType.passport`. The ID type to use for NFC scanning. If unset and `IdScan` is enabled, the ID type from `IdScan` is reused; otherwise, an ID chooser screen is presented.
- `showNFCSymbolConfirmationScreen` (optional, defaults to `true`): bool?. If `true`, shows a screen asking the user whether their document contains an NFC chip. Disabling this is not recommended unless your app handles users without NFC documents, since they can otherwise get stuck.
- `showInitialDataConfirmationScreen` (optional, defaults to `true`): bool?. If `true`, shows the document OCR data confirmation screen before the first NFC scan.
- `processNFCData` (optional, defaults to `true`): bool?. If `true`, the data read from the NFC chip is used to validate identity. Behavior depends on how `FaceMatch` is configured.

### OCREdit

**Module ID:** `ID_OCR`

Reviews OCR data.

- `isEditable` (optional, defaults to `false`): bool?. If `true`, the user can edit the OCR data.

### Phone

**Module ID:** `PHONE`

Collects a user's phone number and can confirm phone ownership by sending a one-time password (OTP) via SMS.

- `defaultRegionPrefix` (optional): int?. Default region prefix for phone input. If set, overrides the default prefix based on the user's device region.
- `otpVerificationEnabled` (optional): bool?. Enables one-time password verification of the entered phone number.

### ProcessId

**Module ID:** `PROCESS_ID`

Processes the ID when the `IdScan` module was separated into front and back captures (that is, when `ScanStepType.front` or `ScanStepType.back` was specified as `scanStep` for `IdScan`).

- `idCategory` (optional): `IdCategory.primary` or `IdCategory.secondary`.
- `enableIdSummaryScreen` **(deprecated)**: Does not apply in V2. In V1, defaults to `true`. Set to `false` to turn off the ID capture summary screen.

<Callout icon="📘" theme="info">
  ### Note

  Call this module only after both `ScanStepType.front` and `ScanStepType.back` `IdScan` modules have completed.
</Callout>

### QRScan

**Module ID:** `QR_SCAN`

Captures the QR code on the back of an ID, decodes its identity data, and sends it to the server.

- `showTutorials` (optional, defaults to `true`): bool?. Shows a tutorial before QR scan.

### SelfieScan

**Module ID:** `SELFIE`

Captures a user’s face with their device’s camera and runs configurable liveness, face recognition, and image quality checks. It can enroll new users so their face can be matched against an ID photo or used for later authentication. It can also log in returning users using 1:1 or 1:N face authentication.

- `showTutorials` (optional, defaults to `true`): bool?.
- `lensesCheck` (optional, defaults to `true`): bool?. Checks whether the user is wearing glasses during the selfie scan.
- `cameraFacing` (optional, defaults to `IdScanCameraFacing.front`): Specifies which camera is used during selfie capture. Set `IdScanCameraFacing.back` to use the back camera. `IdScanCameraFacing` is intentionally shared across the `IdScan`, `SelfieScan`, and `VideoSelfie` modules.
- `faceMaskCheck` (optional, defaults to `true`): bool?. Checks whether the user is wearing a face mask.
- `streamFrames` (optional, defaults to `false`): bool. Enables streaming of the camera feed. Requires the SDK `-vc` variant. See [SDK variants](./flutter-installation#sdk-variants).

### Signature

**Module ID:** `SIGNATURE`

Captures a signature the user hand-draws on screen. It is typically placed at the end of a verification journey to capture explicit consent.

- `title` (optional): String. Title displayed at the top of the screen.
- `description` (optional): String. Description displayed below the title.

### UserConsent

**Module ID:** `USER_CONSENT`

Shows a custom consent agreement for the user to accept or reject.

- `title` (required): String. Title for the user consent screen.
- `content` (required): String. Content for the user consent screen.

### UserScore

**Module ID:** `SHOW_RESULTS`

Shows the info and scoring for all the steps performed.

- `mode` (optional, defaults to `accurate`): `UserScoreFetchMode.accurate` or `UserScoreFetchMode.fast`. With `accurate`, results are fetched from the server (more reliable, some latency). With `fast`, on-device processing results are used.

### VideoSelfie

**Module ID:** `ACCEPT_VIDEO_SELFIE`

Records a short video of the user performing a guided series of actions, including capturing their ID and selfie, to confirm physical presence and run liveness and face match checks. It can also capture voice consent.

- `showTutorials` (optional, defaults to `true`): bool?. Shows a tutorial before video selfie.
- `selfieScanMode` (optional, defaults to `selfieMatch`): `SelfieScanMode.selfieMatch` or `SelfieScanMode.faceMatch`. Selects whether to compare against a captured selfie or the photo from the ID.
- `selfieLivenessCheck` (optional, defaults to `false`): bool?. Checks user liveness during the video selfie.
- `enableFrontShownAsBackCheck` (optional, defaults to `false`): bool?. If `true`, shows real-time feedback during back ID capture if the user appears to be capturing the front side.
- `enableBackShownAsFrontCheck` (optional, defaults to `false`): bool?. If `true`, shows real-time feedback during front ID capture if the user appears to be capturing the back side.
- `showIdScan` (optional, defaults to `true`): bool?. Asks for an ID scan during the video selfie.
- `showDocumentScan` (optional, defaults to `true`): bool?. Asks for proof of address during the video selfie.
- `showVoiceConsent` (optional, defaults to `true`): bool?. Asks for voice consent during the video selfie.
- `voiceConsentQuestionsCount` (optional, defaults to `3`): int?. Number of voice consent questions.
- `showRandomQuestions` (optional): bool?. If `true`, the module shows random questions the user must answer aloud during recording. If `false`, no random questions are shown. If not set, the module decides whether to show them.
- `randomQuestionsCount` (optional): int?. The number of random questions to show when `showRandomQuestions` is `true`.
- `idScanCameraFacing` (optional, defaults to `back`): `IdScanCameraFacing.front` or `IdScanCameraFacing.back`. Specifies which camera is used for ID scan during video selfie. `IdScanCameraFacing` is intentionally shared across the `IdScan`, `SelfieScan`, and `VideoSelfie` modules.

## Required ordering

Some modules must appear in a specific position relative to others. Add modules to your `OnboardingFlowConfiguration` in an order that satisfies all of the following:

- `ProcessId` must follow `IdScan` with both `ScanStepType.front` and `ScanStepType.back`.
- `FaceMatch` must follow both `IdScan` and `SelfieScan`.
- `VideoSelfie` requires `IdScan` (in `faceMatch` mode) or `SelfieScan` (in `selfieMatch` mode) to be present.
- `Aes` (Advanced Electronic Signature) must follow `Phone`, `IdScan`, and `SelfieScan`.
- `UserScore` must be at the end of the flow. Can be before or after `Approve`.
- `Approve` must be at the end of the flow. Can be before or after `UserScore`.

<br />
