Enhanced KYC

Perform an Enhanced KYC

Performing an Enhanced KYC requires you to

  1. Determine the ID type

  2. Gather inputs relevant for that ID type

  3. Call the Smile ID API

Steps 1 and 2 are part of your own UI. The potential data required is available as a model: com.smileidentity.models.IdInfo

Step 3 can be accomplished by calling either the synchronous or asynchronous API:

The API requests require the use of coroutines to avoid blocking the UI thread

val idInfo: IdInfo = ...
val authRequest = AuthenticationRequest(
    jobType = JobType.EnhancedKyc,
    enrollment = false,
    userId = randomUserId(),
)
val authResponse = SmileID.api.authenticate(authRequest)
val enhancedKycRequest = EnhancedKycRequest(
    partnerParams = authResponse.partnerParams,
    signature = authResponse.signature,
    timestamp = authResponse.timestamp,
    country = idInfo.country,
    idType = idInfo.idType,
    idNumber = idInfo.idNumber ?: throw IllegalArgumentException("ID Number required"),
    firstName = idInfo.firstName,
    lastName = idInfo.lastName,
    dob = idInfo.dob,
    bankCode = idInfo.bankCode,
)
val response = SmileID.api.doEnhancedKyc(enhancedKycRequest)

Asynchronous Enhanced KYC

You may also want to perform an Enhanced KYC asynchronously. For this, you will receive the results only to your callback URL. To do this, you must:

  • Include a value for callbackUrl in your EnhancedKycRequest.

  • Call SmileID.api.doEnhancedKycAsync instead

Last updated