App Components

Integration Options

App Components are standalone functionality modules for iOS and Android mobile apps. They capture images and data for you to upload via the API, leveraging Fourthline's data extraction AI services, and provide real-time feedback to the client. If you build custom user journeys, with your own UI, business logic, and orchestration, components reduce development time and effort.

Fourthline provides the UI for the components, which you can customize in the same way as the App Drop-in.
You can dynamically adjust functionality during workflows, e.g. disable the tilted photo step.

App Drop-in vs App Components

App Drop-in vs App Components


Available components


How it works

SDKs

We offer the following SDKs:

  • Android SDK and iOS SDK
  • Cordova, Flutter, and React Native plugins

Supported solutions

You can use App Components for the following solutions:


Workflow

The workflow is as follows:

Components workflow

Components workflow


Configuration

Error handling

You need to handle the following error values:

Starting a workflow session with Orca.workflowSession … .start completes with WorkflowError. The Document, NFC, Biometrics, and QES components complete with WorkflowFailure instead (code + recovery).

For more information, see the WorkflowFailure accordion below and each component card for module-specific codes.

Android & iOS errors (workflow session start)

Android & iOS errors

These errors apply when you start a workflow session (Orca.workflowSession … .start). Component present callbacks return WorkflowError (see the next accordion).

Note

WorkflowError is being replaced by WorkflowFailure. WorkflowError is still used in a few places, such as when starting a workflow session.

ErrorDescription
CanceledThe client canceled the workflow.
Action: Consider creating a new validationCode.
ClientRejectedThe client was rejected.
Action: You cannot create a new workflow for this client.
ConfigurationNotSupportedThe workflowName created with the validationCode isn't supported.
Action: Consider updating your SDK to the latest version.
InvalidSessionThe WorkflowSession is invalid, e.g.
• "InvalidValidationCode": The validationCode is invalid.
• "SessionExpired": The WorkflowSession expired.
Action: Create a new validationCode.
InvalidWorkflowStatusThe workflow modules may have been completed successfully or finished with an error.
ModuleErrorThe client encountered an error in one of the workflow modules, e.g.:
• IdentityVerification.DocumentExpired:
The client's identity document has expired.
• IdentityVerification.DocumentTypeInvalid:
The MRZ of the identity document in the document photo is different from the document type selected by the client.
• IdentityVerification.DocumentTypeMismatch:
The scanned document type must match the selected document type.
• IdentityVerification.DocumentTypeNotSupported:
The client's document type isn't supported.
• IdentityVerification.IssuingCountryNotSupported:
The issuing country of the client's identity document isn't supported.
• IdentityVerification.NationalityNotSupported:
The client's nationality isn't supported.
• IdentityVerification.NoDocumentDetected:
No identity document was detected in the document photos.
• IdentityVerification.PersonNotAdult:
The client is underage.
UnexpectedAn unexpected error occurred.
Action: Immediately report this issue to Fourthline along with the message code.
WorkflowFailure (Document, NFC, Biometrics, QES components)

The Document, NFC, Biometrics, and QES components report WorkflowFailure. Do not parse the English log text for branching.

FieldAndroidiOSUse
Stable identitycode (WorkflowFailureCode, identifier)code (WorkflowFailureCode, rawValue)Branch on known constants. Keep an else / default for codes added in later SDK versions.
Next host steprecovery (WorkflowRecoveryAction)recovery (WorkflowRecoveryAction)Decide retry, wait, new workflow, complete IDV, and similar actions.
Log textmessagedescriptionLogging only. Do not parse for UI or branching.

Use recovery for control flow (what your app does next) and code for user-facing copy and reporting. Special-case user.canceled and terminal outcomes such as qes.signature_completed by code when recovery is unrecoverable.

Recovery actions

AndroidiOSWhat you should do
Retry.retryKeep the same WorkflowSession and call the component present(...) again. Cap retries and check connectivity first.
NewValidationCode.newValidationCodeThe workflow is still valid but the session is dead. Create a new validation code, start a new workflow session, then launch the component again.
NewWorkflow.newWorkflowThis workflow cannot complete the module. Create a new workflow on your backend, then a new validation code and session.
CompleteIdv.completeIdvRun identity verification before QES. Do not relaunch QES until IDV is completed.
Wait.waitFourthline is still processing. Notify the client, then rely on your webhook or backend status polling with backoff.
Unrecoverable.unrecoverableStop the component flow. Branch on code for UX; user.canceled is not an error.

Each component tab lists module-specific failure codes (idv.*, nfc.*, qes.*).

Plugin errors

The error is returned as a JSON string with the following format:

{
"errorCode": Integer,
"errorDescription": String
}
Error codeError description
800Decoding Error
There was an error while decoding the workflow input.
Action: Check the errorDescription for more information.
802Invalid or missing font
The font wasn’t found.
Action: Check the errorDescription for more information.
803User canceled
The client explicitly canceled the workflow.
830JSON parse error
We couldn’t parse the JSON provided.
Action: Check the JSON provided.
850Incorrect configuration
The workflow wasn’t configured correctly.
Action: Check your workflow configuration.
870Unexpected message
An unexpected error occurred.
Action: Inform your Fourthline delivery manager immediately and provide the message code.
1000ClientRejected
The client was rejected.
You can’t retry.
1001InvalidSession
The current WorkflowSession is invalid.
• InvalidValidationCode: The validationCode is invalid.
• SessionExpired: The WorkflowSession expired.
Action: Create a new validationCode.
1002Module error
The client encountered an error in one of the workflow modules.
Action: For more information, check the message.

Possible module errors:
• IdentityVerification.DocumentExpired: The client’s identity document has expired.
• IdentityVerification.DocumentTypeInvalid: The MRZ of the identity document doesn’t match the selected document type.
• IdentityVerification.DocumentTypeMismatch: The scanned document type must match the selected document type.
• IdentityVerification.DocumentTypeNotSupported: The client’s document type isn’t supported.
• IdentityVerification.IssuingCountryNotSupported: The issuing country isn’t supported.
• IdentityVerification.NationalityNotSupported: The client’s nationality isn’t supported.
• IdentityVerification.NoDocumentDetected: No identity document was detected.
• IdentityVerification.PersonNotAdult: The client is underage.
1003ConfigurationNotSupported
The workflow configuration created using the validationCode isn’t supported.
Action: Update to the latest plugin version.
Action: For more information, check the message.
1004InvalidWorkflowStatus
The workflow status is invalid.
Action: Check if the workflow module ended successfully or with an error.

iOS configuration

To ensure the client has granted camera and location permissions, in the Info.plist file, add Privacy - Camera Usage Description and Privacy - Location When In Use Usage Description entries.

Real-time feedback

The components can send document/selfie photos to our backend as soon as they are captured, where we assess the image quality and provide the client feedback in the UI in real time. The component displays an additional screen where we perform further validations.

This ensures higher-quality photos are ultimately uploaded, reduces sendbacks, and improves the user experience.

Agree with your Fourthline delivery manager whether you want to enable real-time feedback for App Components.

UI customization

To customize each component's UI, create an OrcaFlavor object.

For more information, see App UI Customization.


Plugin helpers

Clear workflow session

To delete any workflow resources after a Document, Biometrics, or QES component finishes and clear the workflow session, use the clearWorkflowSession function.

Before launching the component, call startWorkflowSession.

Fourthline.clearWorkflowSession(
function(msg) {
...
});
await _fourthlinePlugin.clearWorkflowSession()
NativeModules.Fourthline.clearWorkflowSession((error, success) => {});

Workflow session availability

To confirm that the workflow session is available before launching a Document, Biometrics, or QES component, use the isWorkflowSessionAvailable function.

Before launching the component, call startWorkflowSession.

Fourthline.isWorkflowSessionAvailable(
function(msg) {
if (msg == "true") {
...
} else {
...
}
)
if (await _fourthlinePlugin.isWorkflowSessionAvailable() ?? false) {
...
}
NativeModules.Fourthline.isWorkflowSessionAvailable((error, isAvailable) => {});