KTP Scan

Flow Version - v1.2

Setup Sdk

Launch Flow

Future<bool> launchKTPScan({
  required DigitalIdentityKTPScanConfig config,
  required DigitalIdentityHelpCenter helpCenter,
  required Function(DocumentVerificationResult)? resultCallback,
}) async { }

Properties:

  • Config (DigitalIdentitySelfieLivenessConfig)**: This class contains the required configuration to launch
    the KTP Scan verification flow using the DigitalIdentity SDK. that contains the following
    information:
    • baseUrl: This is the server URL specific to the partner using the format https://<domain>.
      Example: https://onekyc.ky.id.sandbox.gopayapi.com/
    • token: The unique token for Digital Identity KYC, provided by the user token API for the
      specific partner.
    • correlationId: A unique identifier used to track and correlate events throughout the KTP Scan flow. It helps in debugging, logging, and monitoring user sessions.
    • language: The language setting of the KYC SDK, defined by the UserLanguage type, which
      controls localization and translations during the Kyc Verification flow.
    • theme: The theme parameter is optional, and its default value is null. If not provided, the SDK
      uses the default theme.
      The theme parameter is an instance of the DigitalIdentityKTPScanFlowTheme class. It allows you
      to customize the look and feel of the KYC flow screens. By providing a custom theme, you can
      modify various UI elements, such as colors, fonts, and styles, to match your application's
      branding requirements.
      Here's what each property represents:
      • onboarding (DigitalIdentityOnboardingScreenTheme?): Defines the theme for the
        KTP Scan onboarding screen.
      • camera (DigitalIdentityKTPCameraScreenTheme?): Defines the theme for the KTP
        camera screen, where users take their KTP for scan.
      • guideline (DigitalIdentityGuidelineScreenTheme?): Controls the theme for the KTP
        guideline screen, which provides instructions on taking a proper KTP.
      • verification (DigitalIdentityDocumentVerificationScreenTheme?): Manages the theme
        for the verification screen, where users see the status of their selfie verification.
      • commonDialog (DigitalIdentityCommonDialogTheme?): Handles the theme for Error /
        Informative dialogs used throughout the KTP Scan process.
  • helpCenter: [Optional] Interface for help center option-related actions. Refer to the Help Center section for more details.
  • resultCallback: A redirect link that the SDK uses to notify about the status of the KYC submission
    when it succeeds.
    • correlationId: A unique identifier for tracking the document verification request.
    • submissionId (String): The submission ID assigned if the document verification is successful.
    • status (DocumentVerificationResultStatus): Enum that depicts if any user completed the flow
      or dropped out in between. It has the following values:
      • COMPLETED
      • ERROR
      • NOT_COMPLETED
    • extras (DigitalIdentityExtraData): This class contains error-related information for failed
      document verification attempts that contains the following information:
      • errorCode (DigitalIdentityFlowErrorCode?): Represents the type of error encountered
        in the kyc verification flow
        • CAMERA: Error related to the camera.
        • PERMISSION: Error due to permission issues.
        • NETWORK: Network-related error.
        • USER_CANCELLED: The user canceled the KYC flow.
        • VERIFICATION: When Document verification has errors.
        • MLMODEL_DOWNLOAD: When user dropped from ML download failure error
          dialog.
      • detailedErrorCode (String?): String depicting detailed information regarding the error
        (could be used to log and analyse)
      • errorMessage (String?): String depicting detailed information regarding the error
        (could be used to log and analyse)

Theming Reference

The following screens can be customized using the SDK’s theming system.


KTP Onboarding

Class name: DigitalIdentityOnboardingScreenTheme

Screen Annotations

Mapped Properties

  1. background
  2. backButton
  3. card
  4. title
  5. subtitle
  6. ktpInstructionImage
  7. otherInstructions
    7.1. background
    7.2. icon
    7.3 description
  8. footerView
  9. termsInfo
  10. captureButton

KTP Camera

Class name: DigitalIdentityKTPCameraScreenTheme

Screen Annotations

Mapped Properties

  1. background
  2. backButton
  3. viewGuide
  4. title
  5. captureIndicatorViewColor: While tapping the Capture button in manual capture mode, a fraction of a second camera screen background color will updated to a different color to indicate the image captured. To customize this color we can use this property
  6. feedback
    6.1. background
    6.2. neutral/error/success & feedbacks
  7. changeCaptureMode
    7.1. closeButton
    7.2. card
    7.3. title
    7.4. description
    7.5. primaryCTA
    7.6. secondaryCTA
  8. shutterButton

KTP Guideline

Class name: DigitalIdentityGuidelineScreenTheme

Screen Annotations

Mapped Properties

  1. background
  2. closeButton
  3. guideline.autoCaptureTitle
    guideline.manualCaptureTitle
  4. guideline.autoCaptureInfoView
  5. guideline.autoCaptureInfoTitle
  6. guideline.autoCaptureInfoDescription
  7. guideline.allowedCard
  8. guideline.allowedCardTitle
  9. guideline.notAllowedCard
  10. guideline.notAllowedCardTitle
  11. guideline.autoCaptureInstructions
    guideline.manualCaptureInstructions
  12. guideline.bulletPoint

KTP Verification & KTP Verification Time Exceed

Class name: DigitalIdentityDocumentVerificationScreenTheme

Screen Annotations

Mapped Properties

  1. background
  2. containerCard
  3. backButton
  4. inprogressTitle
  5. verificationTimer
  6. timeExceedTitle
  7. timeExceedImage

Common Dialogs


Documentations