Enrolment Flow
Last updated
Was this helpful?
Last updated
Was this helpful?
In order to use our SDK you need an authorization token. Please check our API "" in this regard.
The Uqudo SDK provides a builder class to initiate the "Enrollment Flow". The example below assumes that you have already :
In order to check if the document type supports the "Lookup Flow" you can use the following method:
Configuration options provided in the Uqudo Enrollment builder are:
authorizationToken
String
No
null
nonce
String
(max size 64 chars)
Yes
null
Nonce provided by the customer mobile application when the SDK is initiated. It is useful to make sure the process has been initiated by the customer mobile application. It should be generated server side.
setSessionID(sessionId)
String
(UUID v4)
Yes
Auto generated
Note: make sure to create always a new session id when you trigger the SDK flow
enableFacialRecognition
Boolean
Yes
false
enableBackgroundCheck(isDisableConsent, backgroundCheckType,
monitoring,
skipView)
Boolean, Integer,
Boolean,
Boolean
Yes
None
add(documentConfig)
UQDocumentConfig
No
None
returnDataForIncompleteSession
Boolean
Yes
false
setAppearanceMode
AppearanceMode
No
SYSTEM
Set the appearance mode for the SDK. The following options are available:
SYSTEM: the SDK checks the OS setting for light or dark mode
LIGHT: force the light mode
DARK: force the dark mode
enableLookup()
None
Yes
None
Note: this feature requires an additional permission and must be explicitly requested
enableLookup(documentTypes)
Array of document types
Yes
None
Note: this feature requires an additional permission and must be explicitly requested
allowNonPhysicalDocuments
Boolean
Yes
false
If enabled allows scanning of non-physical documents (where the SDK doesn't reject scans upon detecting a screen) Note: Available only on SDK version 3.x and above
disableTamperingRejection
Boolean
Yes
false
If enabled directs the SDK not to dismiss the scan upon detecting tampering, specifically for ID photo tampering detection. Note: Available only on SDK version 3.x and above
See the options described below:
disableExpiryValidation
Boolean
Yes
false
Allows to scan expired documents
enableAgeVerification
Int
Yes
-1 (disabled)
Enable age verification. If the age calculated from the document is not above or equals the defined age, the scan fails showing a message to the user accordingly. Age must be above 0 otherwise is not taken into consideration
scan
UQScanConfig
Yes
None
reading
UQReadingConfig
Yes
None
See the options described below:
disableHelpPage
Boolean
Yes
False
Disable scanning help page
faceMinimumMatchLevel
Integer
Yes
None
Defines the minimum match level that the facial recognition has to meet for scanned picture of this specific document
enableScanReview(frontSide, backSide)
Boolean,Boolean
Yes
Not
enabled
Enable scan review of the document for the front side, back side or both. After scanning the detected document side is presented to the user for review and confirmation
enableUpload
Boolean
Yes
False
Enable manual upload of the document instead of automatic scanning. The user can choose a single PDF that contains the image of the document. For a two-side document the first picture must be the front side and the second picture the back side.
If enabled, the reading step is automatically disabled
In order to check if the document type supports the reading step you can use the following method:
See the options described below:
Property
Type
Optional
Default
Description
enableReading
Boolean
Yes
false
Enable reading for the document, e.g. NFC reading of the chip
faceMinimumMatchLevel
Integer
Yes
None
Defines the minimum match level that the facial recognition has to meet for the picture in the chip for this specific document
forceReading(value)
Boolean
Yes
false
Force the reading part. Users will not be able to skip the reading part. If the device does not support NFC and forceReading is set to true, the enrollment builder will throw and exception when you trigger SDK
forceReadingIfSupported(value)
Boolean
Yes
false
Force the reading part only if NFC is supported. Users will not be able to skip the reading part if NFC is supported. Otherwise, after the Scan user will be moved to the next step. Note: This option has been deprecated in version 3.0.0 and is the default behaviour now
forceReadingTimeout
Int
Yes
-1 (disabled)
Defines the timeout in seconds. If the user isn't able to perform the NFC scanning of the document before the timeout expires, a message is shown accordingly, and the user is allowed to skip the NFC step.
In order to check if the document type supports facial recognition you can use the following method:
Note: By default the facial recognition is disabled. You will have to enable facial recognition explicitly as per the below example:
Facial Recognition configuration options available:
scanMinimumMatchLevel
Integer
Yes
None
Defines the minimum match level that the facial recognition has to meet for scanned pictures
readMinimumMatchLevel
Integer
Yes
None
Defines the minimum match level that the facial recognition has to meet for pictures from the chip (e.g. NFC)
obfuscationType
ObfuscationType
Yes
None
Enables audit trail image background obfuscation leaving only the face visible. It can be used when there are privacy concerns related to the background of the selfie taken by the user and shared in the SDK result. There are two types of obfuscations:
FILLED: the background is entirely replaced
FILLED_WHITE: the background is entirely replaced with a wihte background
BLURRED: the background is heavily blurred, making sure the objects in the background are not clearly recognizable, but still giving a perception of the environment surrounding the user and therefore still being able to validate the reality of the image. If privacy is a concern, we recommend using this option
maxAttempts
Int
Yes
3
Set the max failed facial recognition attempts before dropping the session. Note: only values between 1 and 3 are taken into consideration.
allowClosedEyes
bool
Yes
false
Allows to have closed eyes during facial recognition.
enableOneToNVerification
bool
Yes
False
Once activated, following a successful facial recognition (confirming liveness and matching the face), the system initiates a search for the user's selfie within your tenant. If the selfie is not found, it is added, and the indexed facial features are stored in the database. The SDK result includes a unique ID in the face object, along with an indication of whether there was a match with a previously onboarded selfie. It's essential to store this unique ID in your system alongside the user's record, facilitating future searches for users with the same ID. Please be aware that this option requires a specific permission, otherwise, it will be disregarded
Note: This feature requires an additional permission and must be explicitly requested
Note: By default the Background Check is disabled. You need to enable Background Check explicitly. See the example below:
Background Check configuration options available:
isDisableConsent
Boolean
No
false
Disable consent option for the user
backgroundCheckType
Integer
No
RDC
Sets the background check type
RDC
DOW_JONES
enableMonitoring
Boolean
Yes
false
Enable continuous monitoring. See API documentation for details
skipView
Boolean
Yes
false
If enabled, the step will be skipped, and the SDK will trigger the background check without any user interaction.
The Uqudo SDK will throw certain exceptions which need to be handled by the application. The Exceptions are:
IllegalStateException - e.g. enabling the "Lookup Flow" for a document that doesn’t support it or because facial recognition is enabled and the documcent doesn't support it or because of some required configuration missing
UnsupportedDeviceException - e.g. the device is rooted
A failure scenario can be handled with the following method:
See the details about the UQSessionStatus below.
The UQSessionStatus is used to identify the status of the enrollment task. The object contains the following properties:
statusCode contains the following error codes:
USER_CANCELLED = User canceled the enrollment process
SESSION_EXPIRED = Session expired or not found
UNEXPECTED_ERROR = Something went wrong. In the message the details of the error
SESSION_INVALIDATED_READING_INVALID_DOCUMENT = Session gets invalidated because the digital signature validation fails after reading the data in the chip
SESSION_INVALIDATED_CHIP_VALIDATION_FAILED = Session gets invalidated because chip authentication fails (e.g. chip authentication for passports)
SESSION_INVALIDATED_READING_NOT_SUPPORTED = Session gets invalidated because the document doesn’t support reading (e.g. no chip available) and the reading step is forced by configuration
SESSION_INVALIDATED_FACE_RECOGNITION_TOO_MANY_ATTEMPTS = Session gets invalidated because of too many failed facial recognition attempts
SESSION_INVALIDATED_CAMERA_NOT_AVAILABLE = Session gets invalidated because the camera is not available
SESSION_INVALIDATED_CAMERA_PERMISSION_NOT_GRANTED = Session gets invalidated because the end user denied camera permission
statusTask contains the following codes:
SCAN = The scanning task
READING = The NFC reading task
FACE = The facial recognition task
BACKGROUND_CHECK = The background check task (only if skipView() is not enabled)
message contains the details of the status code
Please refer to the Scan API for .
See
Required during the enrolment process using a QR code, see .
Enable facial recognition. See for additional configurations
Enable background check. See for details
Add document config object. See for details.
When enabled, if the user or the SDK drops the session before completion, the SDK will return the partial data together with the SessionStatus object (see ). Please note that you can expect some data only if the user passes at least the scanning step
Enable third party lookup (Government database). See the supported documents and the data returned in
Enable third party lookup (Government database) filtered by document type. For instance, if your KYC process includes more than one document, you can decide to perform the lookup only for one single document. See the supported documents and the data returned in in
Add scan configuration. See for details
Add reading configuration. See for details
The enrollment result will be available to the builder delegate (the class that initiates the SDK has to extends UQBuilderControllerDelegate) if the operation succeeds and you get the result with the following method. See "" for the details about the JWS string:
data as String that contains the JWS object with the partial data of an incomplete KYC session. Returning the partial data for an incomplete KYC session is disabled by default, please see for details.