KTP Scan Flow
Current Flow Version - v1.2
Available Since - 1 Mar 2026
Overview
KTP Scan is an advanced data extraction engine designed to streamline the Know Your Customer (KYC) and digital onboarding lifecycle. Leveraging high-performance Optical Character Recognition (OCR) and sophisticated Machine Learning algorithms, the solution facilitates the seamless conversion of Indonesian National Identity Cards (KTP) into structured, machine-readable datasets. By automating the identification process, KTP Scan enables organizations to replace legacy manual entry workflows with a precise, high-velocity digital alternative.
Key Features
| Technical Implementation | Organizational Impact | |
|---|---|---|
| Guided Data Acquisition | Provides a dynamic overlay frame and real-time positioning feedback to ensure the card is perfectly aligned. | Minimizes user frustration and "drop-off" by guiding them to a successful scan on the first attempt. |
| Obstruction & Glare Detection | Actively detects and alerts users to physical obstructions (e.g., fingers covering fields) or environmental interference (e.g., light glare/reflections). | Prevents the ingestion of incomplete or illegible data, ensuring 100% field visibility for the extraction engine. |
| Intelligent Extraction | Utilizes Optical Character Recognition calibrated for Indonesian ID layouts to capture NIK, Name, and Address. | Enhances data integrity by eliminating human transcription errors. |
High Level Flow
sequenceDiagram
autonumber
title High Level SDK Flow Overview
participant PFE as Partner FE
participant PBE as Partner Backend Service
participant DIS as Digital Identity SDK
box rgb(240, 240, 240) IAB Infra
participant TG as Token Gateway
participant IBE as IAB Gateway
end
rect rgb(230, 245, 255)
Note over PFE, TG: Get Partner token
PBE->>TG: Get Partner token (client_id, passkey)
TG-->>PBE: Partner token
Note over PBE: Cache Partner token
end
PFE->>DIS: Initialize Digital Identity SDK
rect rgb(230, 245, 255)
Note over PFE, IBE: Get User token
PFE->>PBE: Call initiate flow API
PBE->>IBE: Initiate Flow (partner token, user_details)
IBE-->>PBE: User token
PBE->>PFE: User token
end
rect rgb(235, 230, 255)
Note over PFE, IBE: Capture image and Submission processing
PFE->>DIS: launchKTPScan(user token, correlationId, baseUrl)
Note over DIS: Capture Image Screens
rect rgb(255, 245, 230)
Note over DIS, IBE: Submission Processing
DIS->>IBE: Start Submission Processing
Note over IBE: Submission Processing
Note over DIS: Status Polling
DIS->>DIS: Do next action:<br/>- RETRY<br/>- STATUS<br/>- EXIT
end
DIS->>PFE: on Completion(success/failure)
end
rect rgb(230, 245, 255)
Note over PFE, IBE: Get Result Details
IBE->>PBE: Submission Processing Compete Callback
PFE->>PBE: Call "Get Submission Details" API <br/>(correlationId aka partner session id)
PBE->>IBE: Call "Get Submission Details" API (correlationId, partner token)
IBE-->>PBE: return submission details
PBE-->>PFE: Continue processing
end
Note over PFE: Show/process resultDetailed Steps:
-
Partner BE call "Get Partner Token API" through IAB Gateway and caches the Partner Token to be used repeatedly.
-
Partner FE calls Partner BE to get User Token. Partner BE calls IAB Gateway to get user Token using the Initiate Flow API.
- Partner User Id
- Partner User Id Type
- Onboarding partner tied to the flow, which partner wants to launch.
-
Partner FE initializes the Digital Identity FE SDK (IAB FE):
Use the initialise method to initialize the SDK.
-
Partner FE calls launchKtpScan() method of Digital Identity SDK to launch KTP Scan flow with the following parameters:
- baseURL: This is the server URL specific to the partner using the format
https\://<domain>. Example: https://onekyc.ky.id.sandbox.gopayapi.com - correlationId: A unique ID used to create a KTP scan request and track the specific instance of the KTP scan request helpful for logging and event tracking.
- token: The unique user token, different for each user.
- theme(optional): The theme parameter is optional, and its default value is null. If not provided, the SDK uses the default theme (DefaultOneKycKTPScanFlowTheme).
The theme parameter is an instance of the
OneKycSelfieKTPScanFlowThemeclass. It allows you to customize the look and feel of the KTP Scan flow screen. By providing a custom theme, you can modify various UI elements, such as colors, fonts, and styles, to match your application's branding requirements.
- baseURL: This is the server URL specific to the partner using the format
-
IAB FE will capture users' selfies and will upload it to IAB Gateway for KTP Scan processing.
-
IAB Gateway initiates KTP Scan processing.
Integration Contracts
| Document Name | Link |
|---|---|
| BE API Guide | BE API Guide |
| Web SDK Guide | Web SDK Guide |
| Android SDK Guide | Android SDK Contract |
| Flutter SDK Guide | Flutter SDK Contract |
| iOS SDK Guide | iOS SDK Contract |
Updated 1 day ago