Identity Verification

Flow Version - v1.2

Setup Sdk

Launch Flow

fun launchKYCVerification(
    activity: Activity,
    config: DigitalIdentityKYCVerificationConfig,
    helpCenter: DigitalIdentityHelpCenter
)

Properties:

  • activity: Host activity.

  • config: Data required by the Digital Identity SDK. DigitalIdentityKYCVerificationConfig contains the following properties:

    • baseUrl: OneKYC BE URL received from the OneKYC team.
    • token: OneKYC token received from the OneKYC authentication API.
    • correlationId: Unique identifier for the KYC Verification flow.
    • theme: [Optional] It is an instance of the DigitalIdentityKYCVerificationFlowTheme class. If we need to customize the themes for the KYC Verification flow screens, then we need to pass the customized theme values. Refer to the theme customization section for more details.
  • helpCenter: [Optional] Interface for help center option-related actions. Refer to the Help Center section for more details.

DigitalIdentityKYCVerificationConfig(
    baseUrl: String,
    token: String,
    correlationId: String,
    theme: DigitalIdentityKYCVerificationFlowTheme
)

Observe Callback

fun observeKYCVerification(
    owner: LifecycleOwner, 
    resultCallback: (DocumentVerificationResult) -> Unit
)

Properties:

  • owner: Lifecycle owner for callback observers.

  • resultCallback: KYC Verification flow completion status callback. On completion, we will get an instance of the DocumentVerificationResult class. It has the following properties:

    • correlationId: Correlation Id value which passed in the launchKYCVerification method call.

    • status: KYC Verification flow completion status. It is DocumentVerificationResultStatus enumeration type and has the following values:

      • COMPLETED: KYC Verification is done.
      • NOT_COMPLETED: User dropped from KYC Verification flow screens.
      • ERROR: Not applicable for this flow.
    • submissionId: [Optional] Reference number for KYC Verification documents. We will get this value when the status is COMPLETED.

    • extra: [Optional] Type of DigitalIdentityExtraData class. It has the following properties:

      • errorCode: It's a DigitalIdentityFlowErrorCode enum type.
        • CAMERA - User dropped the flow from the camera error bottom sheet
        • PERMISSION - User denied camera permission
        • NETWORK - User dropped the flow from the network error bottom sheet
        • API - User dropped the flow from the api error bottom sheet
        • USER_CANCELLED - User dismissed the flow
      • detailedErrorCode: Subcategory of main errorCode.
      • errorMessage: More details about the error.
DocumentVerificationResult(
    correlationId: String,
    status: DocumentVerificationResultStatus,
    submissionId: String,
    extra: DigitalIdentityExtraData?
)

DigitalIdentityExtraData(
    errorCode: DigitalIdentityFlowErrorCode,
    detailedErrorCode: String,
    errorMessage: String
)

enum class DocumentVerificationResultStatus {
    COMPLETED, NOT_COMPLETED, ERROR
}

Theming Reference

The following screens can be customized using the SDK’s theming system. See Theming Overview for more details.

KYC Onboarding

Class name: DigitalIdentityOnboardingScreenTheme

Screen Annotations

Mapped Properties

  1. statusbar
  2. background
  3. closeButton
  4. ktpCard
    4.1. cardBackground
    4.2. subTitle
    4.3. title
    4.4. image
    4.5. firstGuideline & secondGuideline
    4.5.1. background
    4.5.2. icon
    4.5.3. text
  5. footerBackground
  6. termsTextWidget
  7. continueButton

KTP Camera

Class name: DigitalIdentityKTPCameraScreenTheme

Screen Annotations

Mapped Properties

  1. closeIcon
  2. guidelineText
  3. title
  4. captureStartText
  5. cameraScanFeedbacks
  6. captureManualButton
  7. captureManualCard
    7.1. closeButton
    7.2. background
    7.3. image
    7.4. title
    7.5. description
    7.6. primaryCTA
    7.7. secondaryCTA

KTP Capture Guideline

Class name: DigitalIdentityGuidelineDialogTheme

Screen Annotations

Mapped Properties

  1. closeButton
  2. background
  3. title
  4. autoCaptureinfoBackground
  5. autoCaptureInfoTitle
  6. autoCaptureInfoDescription
  7. allowedIllustration
  8. allowedCardTitle
  9. notAllowedIllustration
  10. notAllowedCardTitle
  11. captureInstructions

KTP Manual Capture Guideline

Class name: DigitalIdentityGuidelineDialogTheme

Screen Annotations

Mapped Properties

  1. closeButton
  2. background
  3. title
  4. allowedIllustration
  5. notAllowedIllustration
  6. allowedCardTitle
  7. notAllowedCardTitle
  8. captureInstructions

Selfie Camera

Class name: DigitalIdentitySelfieCameraScreenTheme

Screen Annotations

Mapped Properties

  1. closeIcon
  2. guidelineText
  3. title
  4. captureStartText
  5. cameraScanFeedbacks
  6. capturePrepareCard &
    captureExhaustedCard
    6.1. background
    6.2. title
    6.3. infoList
    6.3.1. topImage
    6.3.2. text
    6.4. primaryCTA
    6.5. helpCTA
    6.6. secondaryCTA

Selfie Capture Guideline

Class name: DigitalIdentityGuidelineDialogTheme

Screen Annotations

Mapped Properties

  1. closeButton
  2. background
  3. title
  4. autoCaptureinfoBackground
  5. autoCaptureInfoTitle
  6. autoCaptureInfoDescription
  7. allowedIllustration
  8. allowedCardTitle
  9. notAllowedIllustration
  10. notAllowedCardTitle
  11. captureInstructions

Selfie Verification

Class name: DigitalIdentityVerificationScreenTheme

Screen Annotations

Mapped Properties

  1. statusBar
  2. closeIcon
  3. background
  4. verificationTitle
  5. timerBackground
  6. timerText
  7. timeOutTitle
  8. timerLoaderIcon

Selfie Failure

Class name: DigitalIdentityChallengeFailureScreenTheme

Screen Annotations

Mapped Properties

  1. statusBar
  2. appBar
    2.1. navigationIcon
    2.2. title
  3. headerBackground
  4. widgetIcon
  5. widgetBackground
  6. failureCard
    6.1. cardBackground
    6.2. title
    6.3. description
    6.4. guideOne & guideTwo
    6.4.1. title
    6.4.2. icon
    6.4.3. description
    6.5. separator
  7. exhaustedCard (has same
    configuration as failureCard)
  8. retryButton
  9. helpButton

Uploading Screen

Class name: DigitalIdentityUploadScreenTheme

Screen Annotations

Mapped Properties

  1. statusBar
  2. background
  3. closeIcon
  4. loadingState
    4.1. icon
    4.2. title
    4.3. description
    4.4. progressBar

Common Dialogs


Documentations