Biometric KYC

Perform a Biometric KYC Job

Biometric KYC is exposed as a flow which performs the following high level steps:

  1. Displays instructions to the user

  2. Requests camera permissions (if not already granted)

  3. Captures and saves Liveness and Selfie images

    1. useStrictMode defaults to false and will use Smile Smartselfie™ capture screens for selfie

    2. If useStrictMode is set to true the selfie capture use Enhanced SmartSelfie™ capture

  4. Submits the job to the Smile ID API

  5. Delivers the result back to the caller

Some ID Types may require consent to be granted. In such cases the consent information would expect the below so this is completely optional and the SDK will default to false and consent time will be the time of execution

consentGrantedDate. // The date consent was granted defaults to the time of screen initialisation
personalDetailsConsentGranted // If the user has granted personal details consent defaults to false
contactInfoConsentGranted // If the user has granted contact information consent defaults to false
documentInfoConsentGranted // If the user has granted document information consent defaults to false

If the user has granted consent personalDetailsConsentGranted, contactInfoConsentGranted, documentInfoConsentGranted can all be set to true

@Composable
fun BiometricKYCExample(idInfo: IdInfo) {
    SmileID.BiometricKYC(
        idInfo = idInfo,
        consentInformation =
        ConsentInformation(
            consentGrantedDate = getCurrentIsoTimestamp(), // date in iso string format for when user granted consent
            personalDetailsConsentGranted = false, // set true if user has agreed to personal details, will default to false
            contactInfoConsentGranted = false, // set true if user has agreed to contact information, will default to false
            documentInfoConsentGranted = false, // set true if user has agreed to document information, will default to false
        ),
        useStrictMode = true, // true if you want to capture using enhanced SmartSelfie™ capture) { result ->
        onResult = { result ->
            when (result) {
                is Success -> {
                    // val resultData = result.data
                    // Log.d("BiometricKYC", "Success: $resultData")
                    // ...
                }

                is Error -> {
                    // There was an error (could be denied camera permissions, network errors, etc)
                    // val throwable = result.throwable
                    // Log.w("BiometricKYC", "Failure: $it", throwable)
                }
            }
        },
    )
}

Last updated

Was this helpful?