# Results

Every module in an onboarding flow reports its outcome to your `IncdOnboardingDelegate`. Most modules deliver a **result object** through a dedicated callback. A few modules signal completion without a result object: for example, [Video Conference](https://developer.incode.com/docs/module-conference) reports a success `Bool` and an optional error.

This page lists every result and error object. The groups match the categories on [Modules](https://developer.incode.com/docs/ios-individual-modules). For the full field list of a result type, see its module page.

The flow's terminal callbacks are `onSuccess()` when the flow finishes, `userCancelledSession()` when the user cancels, and `onError(_:)` when it fails.

***

## Result Delivery

Results arrive on the module's success callback, such as `onIdProcessed(_ result: IdProcessResult)`. `IncdOnboardingDelegate` declares all of these result callbacks. The SDK also defines narrower delegate protocols for specific scenarios:

- `IDCaptureControllerDelegate`: Real-time callbacks while capturing an ID.
- `IncdLoginDelegate`: Face-login sync progress.
- `IncdOnboardingVideoConferenceDelegate`: Assisted-video-conference callbacks.

The iOS SDK has no single shared status type. Each result struct carries its own fields describing the module's outcome. For example, `GovernmentValidationResult` exposes `success: Bool` and `error: IncdError?`, while `IdScanResult` exposes `scanStatus: IncdIdScanStatus` (an enum with cases such as `ok`, `errorGlare`, and `errorSharpness`). See [each individual module's page](https://developer.incode.com/docs/ios-individual-modules).

A few modules do not return a result object. They signal completion with a callback that carries only a status: for example, `onVideoConferenceCompleted(_ success: Bool, _ error: VideoConferenceError?)`.

***

## Error Delivery

Errors surface on the shared `onError(_ error: IncdFlowError)` path. `IncdFlowError` is a single enum with cases such as `initError(_:)`, `error(_:)` (wrapping an `IncdError`), `sessionCreationFailed(_:)`, `permissionsDenied`, `declinedToSignDocument`, `captchaNotVerified(_:)`, `videoSelfieNotCompleted(_:)`, `sectionAlreadyRunning(_:)`, `watchlistProcessFailed(_:)`, and `interrupted`.

Flow-level failures are reported through `IncdFlowError` on `onError(_:)`. In addition, several modules define their own error enum, carried by the `error` field of that module's result object: for example, `VideoSelfieResult.error` (`VideoSelfieError`), `IdScanResult.error` (`IncdIdScanError`), and `FaceAuthenticationResult.error` (`FaceAuthenticationError`). When a result object has such an `error` field, it carries that module's specific failure cause for the step.

***

## Collect Identity Data

| Module                                                                                   | Result Object        | Delivered Via                                                                                                                                                                                                  |
| ---------------------------------------------------------------------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Document Capture](https://developer.incode.com/docs/module-document-scan) | `DocumentScanResult` | `onDocumentScanCompleted(_ result: DocumentScanResult)`                                                                                                                                                        |
| [Dynamic Forms](https://developer.incode.com/docs/module-dynamic-forms)    | `DynamicFormsResult` | `onDynamicFormCompleted(_ result: DynamicFormsResult)`                                                                                                                                                         |
| [Email](https://developer.incode.com/docs/module-email)                    | `EmailAddressResult` | `onAddEmailAddressCompleted(_ result: EmailAddressResult)`                                                                                                                                                     |
| [Full Name](https://developer.incode.com/docs/module-full-name)            | `UserNameInfoResult` | `onAddFullNameCompleted(_ result: UserNameInfoResult)`                                                                                                                                                         |
| [Geolocation](https://developer.incode.com/docs/module-geolocation)        | `GeolocationResult`  | `onGeolocationCompleted(_ result: GeolocationResult)`                                                                                                                                                          |
| [ID Capture](https://developer.incode.com/docs/module-id-scan)             | `IdScanResult`       | `onIdFrontCompleted(_ result: IdScanResult)`<br />`onIdFrontAttemptCompleted(_ result: IdScanResult)`<br />`onIdBackCompleted(_ result: IdScanResult)`<br />`onIdBackAttemptCompleted(_ result: IdScanResult)` |
| [ID OCR](https://developer.incode.com/docs/module-id-info)                 | `OcrResult`          | `onOcrCompleted()`                                                                                                                                                                                             |
| [NFC](https://developer.incode.com/docs/module-nfc-scan)                   | `NFCScanResult`      | `onNFCScanCompleted(_ result: NFCScanResult)`                                                                                                                                                                  |
| [Phone](https://developer.incode.com/docs/module-phone)                    | `PhoneNumberResult`  | `onAddPhoneNumberCompleted(_ result: PhoneNumberResult)`                                                                                                                                                       |
| [QR Scan](https://developer.incode.com/docs/module-qr-scan)                | `QRScanResult`       | `onQRScanCompleted(_ result: QRScanResult)`                                                                                                                                                                    |
| [Selfie](https://developer.incode.com/docs/module-selfie)                  | `SelfieScanResult`   | `onSelfieScanCompleted(_ result: SelfieScanResult)`<br />`onSelfieAttemptCompleted(_ result: SelfieScanResult)`                                                                                                |
| [Video Selfie](https://developer.incode.com/docs/module-video-selfie)      | `VideoSelfieResult`  | `onVideoSelfieCompleted(_ result: VideoSelfieResult)`                                                                                                                                                          |

### Module-Specific Errors

Unless noted below, a module's errors surface on the shared `onError(_:)` path.

- **Video Selfie**: Unlike most modules, a Video Selfie failure ends the flow. `VideoSelfieResult.error` (`VideoSelfieError`) is delivered through `onVideoSelfieCompleted(_:)` whenever captured video or audio data exists; if `error` is non-`nil`, the SDK additionally calls `onError(_:)` with `IncdFlowError.videoSelfieNotCompleted(_:)`, wrapping that same `VideoSelfieError`. Cases include `videoSelfieNotAuthorized`, `screenRecordingPermissionsDenied`, `recordingMicrophonePermissionsDenied`, `voiceConsentMicrophonePermissionsDenied`, `internalError(_:)`, and `error(_:)` (wrapping an `IncdError`).

***

## Verify and Authenticate

| Module                                                                                                | Result Object                 | Delivered Via                                                           |
| ----------------------------------------------------------------------------------------------------- | ----------------------------- | ----------------------------------------------------------------------- |
| [Antifraud](https://developer.incode.com/docs/module-antifraud)                         | `AntifraudResult`             | `onAntifraudCompleted(_ result: AntifraudResult)`                       |
| [CURP Validation](https://developer.incode.com/docs/module-curp-validation)             | `CURPValidationResult`        | `onCURPValidationCompleted(_ result: CURPValidationResult)`             |
| [Custom Watchlist](https://developer.incode.com/docs/module-custom-watchlist)           | `CustomWatchlistResult`       | `onCustomWatchlistCompleted(_ result: CustomWatchlistResult)`           |
| [eKYB (electronic Know-Your-Business)](https://developer.incode.com/docs/module-ekyb)   | `EkybResult`                  | `onExternalValidationEkybCompleted(_ result: EkybResult)`               |
| [eKYC (electronic Know-Your-Customer)](https://developer.incode.com/docs/module-ekyc)   | `EKYCResult`                  | `onEKYCCompleted(_ result: EKYCResult)`                                 |
| [Face Authentication](https://developer.incode.com/docs/module-face-authentication)     | `FaceAuthenticationResult`    | `onFaceAuthenticationCompleted(_ result: FaceAuthenticationResult)`     |
| [Face Match](https://developer.incode.com/docs/module-face-match)                       | `FaceMatchResult`             | `onFaceMatchCompleted(_ result: FaceMatchResult)`                       |
| [Global Watchlist](https://developer.incode.com/docs/module-global-watchlist)           | `GlobalWatchlistModuleResult` | `onGlobalWatchlistCompleted(_ result: GlobalWatchlistModuleResult)`     |
| [Government Validation](https://developer.incode.com/docs/module-government-validation) | `GovernmentValidationResult`  | `onGovernmentValidationCompleted(_ result: GovernmentValidationResult)` |
| [Process ID](https://developer.incode.com/docs/module-process-id)                       | `IdProcessResult`             | `onIdProcessed(_ result: IdProcessResult)`                              |

### Module-Specific Errors

Unless noted below, a module's errors surface on the shared `onError(_:)` path.

- **Face Authentication**: `FaceAuthenticationError` is a dedicated face-authentication error enum, carried by the `error` field of `FaceAuthenticationResult`. Its cases include `spoofAttemptDetected(_:)`, `userIsNotRecognized(_:)`, `faceMaskDetected(_:)`, `deniedCameraPermissions`, `userCancelled`, and `error(_:)` (wrapping an `IncdError`).

***

## Capture Signatures and Consent

These modules' errors surface on the shared `onError(_:)` path.

| Module                                                                                                      | Result Object                  | Delivered Via                                                               |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------ | --------------------------------------------------------------------------- |
| [AES (Advanced Electronic Signature)](https://developer.incode.com/docs/module-aes)           | `AESResult`                    | `onAESCompleted(result: AESResult)`                                         |
| [Combined Consent](https://developer.incode.com/docs/module-combined-consent)                 | `CombinedConsentResult`        | `onCombinedConsentsGiven(_ result: CombinedConsentResult)`                  |
| [Machine Learning Consent](https://developer.incode.com/docs/module-machine-learning-consent) | `MachineLearningConsentResult` | `onMachineLearningConsentCompleted(_ result: MachineLearningConsentResult)` |
| [QES (Qualified Electronic Signature)](https://developer.incode.com/docs/module-qes)          | `QESResult`                    | `onQESCompleted(result: QESResult)`                                         |
| [Signature](https://developer.incode.com/docs/module-signature)                               | `SignatureFormResult`          | `onSignatureCollected(_ result: SignatureFormResult)`                       |
| [User Consent](https://developer.incode.com/docs/module-user-consent)                         | `UserConsentResult`            | `onUserConsentGiven(_ result: UserConsentResult)`                           |

***

## Add Human-Assisted Verification

This module's errors surface on the shared `onError(_:)` path.

| Module                                                                                | Result Object      | Delivered Via                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Video Conference](https://developer.incode.com/docs/module-conference) | No result payload. | `onVideoConferenceCompleted(_ success: Bool, _ error: VideoConferenceError?)`. Queue updates arrive through `onQueuePositionChanged(_ newQueuePosition: Int)` and `onEstimatedWaitingTime(_ waitingTimeInSeconds: Int)`. |

***

## Configure the User Experience

This module's errors surface on the shared `onError(_:)` path.

| Module                                                                                | Result Object      | Delivered Via                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Custom Module](https://developer.incode.com/docs/module-custom-module) | No result payload. | `onCustomModuleStarted(callbackName: String, onCustomModuleCompleted: @escaping (CustomModuleStatus) -> Void)`. You return a `CustomModuleStatus`: `ok`, `fail`, `warn`, or `unknown`. Completion is also reported through `onCustomModuleCompleted(_ result: IncdError?)`. |

***

## View Results

This module's errors surface on the shared `onError(_:)` path.

| Module                                                                    | Result Object | Delivered Via                             |
| ------------------------------------------------------------------------- | ------------- | ----------------------------------------- |
| [Results](https://developer.incode.com/docs/module-results) | `UserScore`   | `onUserScoreFetched(_ result: UserScore)` |

***

## Configure iOS-Specific Experiences

| Module                                                                      | Result Object      | Delivered Via                                                                                                                                                                                                |
| --------------------------------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Approval](https://developer.incode.com/docs/module-approval) | `ApprovalResult`   | `onApproveCompleted(_ result: ApprovalResult)`                                                                                                                                                               |
| [Captcha](https://developer.incode.com/docs/module-captcha)   | `CaptchaResult`    | `onCaptchaCompleted(_ result: CaptchaResult)`                                                                                                                                                                |
| [Intro](https://developer.incode.com/docs/module-intro)       | No result payload. | On success, the flow advances to the next module with no callback. If the user dismisses the step, `userCancelledSession()` is called; any other failure surfaces through `onError(_ error: IncdFlowError)`. |

<br />
