Skip to main content

HyperKYC Mobile SDK

The HyperKYC Mobile SDK enables seamless KYC workflows on mobile platforms. This page covers Android, iOS, React Native, and Flutter integrations.

Sample Apps

PlatformDownload
Androidhyperkyc-android.zip
iOShyperkyc-ios.zip

Android

Introduction

Requirements:

  • Minimum SDK level: 21 (Android 5.0 – Lollipop)
  • Supports Play Store's 16 KB page size requirement (from 2.x.x series)
  • Min Kotlin version: 1.8.0

Gradle Setup

Add this to the project-level build.gradle.kts:

allprojects {
repositories {
google()
mavenCentral()
maven(url = "https://s3.ap-south-1.amazonaws.com/hvsdk/android/releases")
}
}

SDK Size Optimization

By default, the SDK includes face detection, document detection, and other modules. Exclude unused modules to reduce app size:

implementation("co.hyperverge:hyperkyc:2.0.1") {
isTransitive = true

// Exclude in-house face detector (~1.3 MB)
// SDK will fallback to a lighter detector (~300 KB)
// exclude(group = "co.hyperverge", module = "face-detection-preview-frame")

// Exclude document detection (~12 MB)
// exclude(group = "co.hyperverge", module = "hyperdocdetect")
}
ModuleDescriptionExclusion Impact
face-detection-preview-frameIn-house face detectorReduces ~1.3 MB, fallback ~300 KB
hyperdocdetectDocument auto-capture/detectionReduces ~12 MB
warning

Only exclude modules if the functionality is not required by your workflow.

Core Identifiers

ParameterDescriptionNotes
appIdApplication ID issued by HyperVergeRequired in all sessions
appKeySecret key for authenticationUse securely; avoid hardcoding
accessTokenSession token for authPreferred in production; overrides appKey
transactionIdUnique ID per sessionMust be fresh per attempt
workflowIdWorkflow defined in dashboardLinks to configured KYC flow

Customising HyperKYC Config

hyperKYCconfig.setInputs(hashMapOf("name" to "sample name"))
hyperKYCconfig.setUseLocation(true)
hyperKYCconfig.setDefaultLangCode("en")
hyperKYCconfig.setUniqueId("12345-abc")
FunctionPurpose
setInputs(inputs: Map<String, Any>)Pre-fill workflow fields with dynamic inputs
setUseLocation(useLocation: Boolean)Request location consent — denial prevents workflow
setDefaultLangCode(defaultLangCode: String)Set default workflow language
setUniqueId(uuid: String)Add unique ID for Cross-Platform Resume

Permissions & Play Store Compliance

The SDK requires:

  • Camera — for document/face capture
  • Microphone — for video workflows
  • Location (optional) — if setUseLocation(true) is enabled
Play Store Policy

All apps must target Android 15 and comply with permission policies.

Error Handling Example

private val startKYCLauncher = registerForActivityResult(HyperKyc.Contract()) { result ->
Log.d(TAG, "registerForActivityResult callback called with: result = $result")

val dataJson = GsonBuilder().setPrettyPrinting().create().toJson(result)

when (result.status) {
HyperKycStatus.ERROR -> updateResult(
"Workflow failed - " + "${result.status} \n" +
" ${result.transactionId} \n" +
" ${result.details} \n" +
" ${result.errorCode} \n" +
" ${result.errorMessage}\n\n\n" +
" $dataJson"
)
else ->
updateResult("Workflow successful - \n$dataJson")
}
}

Android FAQs

What permissions does the SDK require?

The SDK requests only the minimum permissions required for KYC workflows:

  • Camera — for face/document capture
  • Microphone — for video KYC workflows
  • Location (optional) — only if enabled via setUseLocation(true)
  • NFC (optional) — only if NFC workflows are used

Remove unused permissions in your AndroidManifest.xml:

<uses-permission android:name="android.permission.RECORD_AUDIO"
tools:node="remove" />
Does the SDK support targetSdkVersion 35 (Android 15)?

Yes. From HyperKYC SDK v2.x.x onwards:

  • 16 KB page size support (mandatory for Android 15)
  • Edge-to-edge support
  • No breaking changes for clients targeting SDK 35

If you are targeting Android 15, update to v2.x.x or above.

Why am I seeing an "Intent Redirection" security warning in Play Console?

This issue was present in HyperKYC v0.30.1 and below. Google Play flags it as an Intent Redirection vulnerability.

Solution: Upgrade to HyperKYC v0.30.2 or above. There is no workaround — updating is the only fix.

Why am I seeing a Kotlin incompatibility warning?

Older SDK versions (< 2.0.0) used Kotlin's removeFirst() and removeLast() functions, which conflict with Java functions in Android 15 and can cause crashes on Android 14 or lower.

Solution: Upgrade to HyperKYC v2.0.0 or above. If using webCore, this is not an issue.


iOS

Introduction

Requirements:

  • Supported iOS: iOS 12+
  • Xcode Requirement: 15.1+
  • Integration: CocoaPods

SDK Setup

In your Podfile:

pod 'HyperKYC', 'x.x.x'

Then run:

pod install --repo-update

Workflow Prefetch

To improve performance, prefetch workflow configuration before launch:

HyperKyc.prefetch("appId", "workflowId")

Launching the Workflow

let transactionId = "iOSHKYCSample_" + self.randomString(length: 10)

let hyperKYCConfig = HyperKycConfig(
appId: "<APP_ID>",
appKey: "<APP_KEY>",
workflowId: "workflow-id",
transactionId: transactionId
)

HyperKyc.launch(self, hyperKycConfig: hyperKYCConfig) { hyperKycResult in
// Handle result
}
info

In production, prefer token-based authentication instead of embedding appKey.

iOS Configuration Options

FunctionPurpose
setInputs([:])Pre-fill workflow fields
setUseLocation(true/false)Request location consent
setDefaultLangCode("en")Set default workflow language
setUniqueId("uuid")Unique ID for Cross-Platform Resume

iOS Permissions

Add required keys in Info.plist:

<key>NSCameraUsageDescription</key>
<string>Camera required for KYC</string>

<key>NSMicrophoneUsageDescription</key>
<string>Microphone required for video KYC</string>

<key>NSLocationWhenInUseUsageDescription</key>
<string>Location required for KYC workflow</string>

iOS FAQs

Why am I seeing "Unable to present on ... which is already presenting"?

This happens if the SDK is launched from a controller that is already presenting another view.

Solution: Always initialize and launch HyperKYC from your app's main/root view controller (or top-most visible controller).

Does the SDK support iOS 26 or face capture on iOS 26 devices?

Yes. HyperKYC SDK supports iOS 26 from version 0.48.0 onwards.

  • All workflows (document capture, liveness, NFC, etc.) are compatible on iOS 26
  • The face capture red overlay issue seen on earlier SDK versions has been fixed in v0.48.0
Why was my iOS app flagged for using NFC framework?

The HyperKYC SDK uses NFC only when the NFC module is enabled in your workflow, and strictly for scanning ISO7816-compliant NFC smart cards (e-passports, national ID cards).

The SDK does not use NFC for payments or financial transactions. If your workflow does not include NFC, the SDK will not invoke or require NFC functionality.


React Native

Introduction

Requirements:

  • React Native: 0.71+ (recommended)
  • Android: minSdkVersion 21
  • iOS: iOS 12+, Xcode 15.1+
  • Requires App ID and App Key (or Access Token) from HyperVerge

Installation

# Install the RN wrapper
npm install @hyperverge/hyperkyc-react-native
# or
yarn add @hyperverge/hyperkyc-react-native

# For iOS
cd ios && pod install && cd ..
info

For projects using the new RN architecture, no manual linking is required. For older setups, follow the wrapper's README.

Platform Setup

Android

Ensure minSdkVersion 21 in android/app/build.gradle. Add required permissions in AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />

<!-- Optional -->
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
<!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> -->
<!-- <uses-permission android:name="android.permission.NFC" /> -->

iOS

Add permission descriptions in Info.plist:

<key>NSCameraUsageDescription</key>
<string>Camera required for KYC</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone required for video KYC</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location required for KYC workflow</string>

Prefetch (Optional)

To reduce startup latency:

Hyperkyc.prefetch('<APP_ID>', '<WORKFLOW_ID>');

Launching a Workflow

import React from 'react';
import { Button } from 'react-native';
import { NativeModules } from 'react-native';
const { Hyperkyc } = NativeModules;

const appID = '<YOUR_APP_ID>';
const appKey = '<YOUR_APP_KEY>'; // In production, use Access Tokens

export default function HyperKYCExample() {
const startHyperKYC = () => {
const transactionId = generateUUID(); // must be unique per session

const config: any = {
appId: appID,
appKey: appKey,
workflowId: 'workflow-id',
transactionId: transactionId,
inputs: {
panNumber: 'ABCDE1234F',
},
};

// Get a uniqueId for CPR support
Hyperkyc.createUniqueId((uniqueId: string) => {
config.uniqueId = uniqueId;

Hyperkyc.launch(config, (response: any) => {
console.log('HyperKYC Response:', response);
});
});
};
}

React Native Parameters

KeyTypeRequiredDescription
appIdstringYesProvided by HyperVerge
appKeystringYes*Required if not using accessToken
accessTokenstringYes*Preferred in production (supersedes appKey)
workflowIdstringYesWorkflow configured in dashboard
transactionIdstringYesUnique per session
inputsRecordNoPre-fill workflow inputs
uniqueIdstringNoObtained via createUniqueId; used for CPR

Flutter

Work in Progress

Flutter SDK is under development.


Standardised Error Codes

The SDK exposes standardized error codes for consistent handling across modules and platforms.

CodeNameAndroidiOSDescription
101SDK_CONFIG_ERRORConfig errors (empty/invalid appId, workflowId, transactionId, accessToken, defaultLangCode)
102SDK_INPUT_ERRORInvalid/missing inputs, file inaccessible
103USER_CANCELLED_ERRORUser closed/cancelled workflow
104WORKFLOW_ERRORWorkflow execution errors (doc, face, API, encryption)
105SDK_VERSION_ERRORSDK version not supported by workflow
106PERMISSIONS_ERRORRequired permission not granted
107HARDWARE_ERRORDevice hardware/camera failure
108GPS_ACCESS_DENIEDLocation permission denied
109QR_SCANNER_ERRORQR scanner submodule missing (Android)
110SSL_CONNECT_ERRORSSL handshake/pinning failure
111NETWORK_ERRORConnectivity/server errors
112SIGNATURE_FAILED_ERRORResponse signature mismatch
113FACE_NOT_DETECTEDFace not detected or blurry
114DEVICE_ROOTED_ERRORRooted/jailbroken device (Android only)
115SECURITY_ERRORScreenshot/screen recording detected (iOS only)
117ACTIVITY_DESTROYED_ERRORLow memory / "Don't keep activities" (Android only)
118LOW_STORAGE_ERRORFree space < 1 MB (Android only)
119NFC_INVALID_ERRORNFC SDK module missing (Android only)
120NFC_UNAVAILABLE_ERRORNFC not available on device
121NFC_AUTHENTICATION_ERRORNFC chip authentication failed
122NFC_CONNECTION_ERRORNFC card disconnected mid-scan
123WEB_FORM_ERRORWeb form integration/config errors
124BROWSER_NOT_SUPPORTEDNo compatible browser installed
125NFC_INCOMPLETE_SCAN_ERRORNFC scan incomplete
126PRIVACY_CONSENT_DENIED_ERRORUser denied privacy consent
127WEBCORE_NOT_SUPPORTEDMissing Play Services / WebView (Android only)
128SDK_EXIT_ERRORSDK closed unexpectedly / backgrounded
140SDK_INTERNAL_ERRORUnexpected SDK state (Android only)
141PERMISSION_REVOKED / DATE_FORMAT_ERRORAndroid: permission revoked; iOS: invalid date format
151CHECK_SESSION_ERRORSession validation failed (CPR)
Was this helpful?
Ask AI

Ask anything about the internal documentation

AI answers are based on internal documentation. Verify critical information.