Socket
Book a DemoInstallSign in
Socket

react-native-kalapa-tpbank-ekyc

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-kalapa-tpbank-ekyc

React Native SDK for Kalapa eKYC integration

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

React Native Kalapa eKYC SDK

A React Native SDK for implementing eKYC (Electronic Know Your Customer) functionality in your mobile applications. This SDK provides a seamless integration for identity verification and document scanning.

Changelog

  • Add more error result code to handle
  • Add webview callback
  • Maintain and optimize

Requirements

  • React Native >= 0.66.4
  • iOS >= 13.0
  • Android API Level >= 26

Features

  • Document scanning and verification
  • Face liveness detection
  • Customizable UI
  • Multi-language support (English and Vietnamese)
  • Comprehensive error handling
  • Secure data transmission

Installation

npm install react-native-kalapa-tpbank-ekyc react-native-reanimated
# or
yarn add react-native-kalapa-tpbank-ekyc react-native-reanimated

Alternatively, you can manually add the following line to your app/package.json:

"dependencies": {
    "react-native-kalapa-tpbank-ekyc": "^1.0.5",
    "react-native-reanimated": "^1.9.0"
}

iOS Setup

  • Install pods:
cd ios && pod install
  • Declare camera and NFC permission
  • Update the Info.plist by adding these lines:
<key>LSApplicationQueriesSchemes</key>
<array>
	<string>undecimus</string>
	<string>sileo</string>
	<string>zbra</string>
	<string>filza</string>
</array>
<key>NFCReaderUsageDescription</key>
<string>This eKYC app needs NFC reader to scan chip</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
<string>A0000002472001</string>
<string>00000000000000</string>
</array>
<key>NSCameraUsageDescription</key>
<string>This eKYC app needs to use camera to scan document</string>
  • Add the Near Field Communication Tag Reading capability to your project target

Usage

import { KalapaSDK } from 'react-native-kalapa-tpbank-ekyc';

const YourComponent = () => {
  const handleComplete = (result) => {
    console.log('eKYC completed:', result);
  };

  const handleError = (error) => {
    console.error('eKYC error:', error);
  };

  const handleClose = () => {
    console.log('eKYC closed');
  };

  const config = {
    domain: "https://ekyc-sdk.kalapa.vn", // For production
    main_color: '#A167D8',
    main_text_color: "#000000",
    btn_text_color: "#FFFFFF",
    background_color: '#FFFFFF'
  };

  return (
    <KalapaSDK
      dopBaseURL="YOUR_DOP_BASE_URL"
      accessToken="YOUR_ACCESS_TOKEN"
      phoneNumber="USER_PHONE_NUMBER"
      appconfig={config}
      onComplete={handleComplete}
      onError={handleError}
      onClose={handleClose}
    />
  );
};

Error Handling

The SDK provides comprehensive error handling through the onError callback:

import { KalapaSDKResultCode } from 'react-native-kalapa-tpbank-ekyc';

const handleError = (error) => {
      console.error("Unknown error:", KalapaSDKResultCode.getMessage(error.code));
};

Result Format

The onComplete callback receives a JSON string with the following structure:

Front Side (frontResult)

PropertyTypeDescription
typestringType of ID card
namestringFull name
id_numberstringID number
genderstringGender
birthdaystringBirthday
homestringHome town
residentstringResident address
featuresstringPersonal features
doistringDate of issued
poistringPlace of issued
doestringDate of expiry
qr_codeobjectQR code data if present
mrz_dataobjectMachine Readable Zone data
nfc_dataobjectData in NFC chip

QR Code (qr_code)

PropertyTypeDescription
data.decoded_textstringDecoded QR code text

MRZ Data (mrz_data)

PropertyTypeDescription
data.raw_mrzstringRaw MRZ text

NFC Data (nfc_data)

PropertyTypeDescription
namestringFull name from NFC
id_numberstringID number from NFC
genderstringGender from NFC
nationstringEthnicity from NFC
date_of_birthstringBirthday from NFC
date_of_issuancestringDate of issued from NFC
date_of_expirystringExpired date from NFC
hometownstringHome town from NFC
addressstringResident address from NFC
personal_identificationstringPersonal features from NFC
father_namestringFather's name from NFC
mother_namestringMother's name from NFC
mrzstringMRZ data from NFC

Additional Notes

  • The SDK requires internet permission. Add to your Android manifest:
<uses-permission android:name="android.permission.INTERNET" />
  • For iOS, ensure you have the following in your Info.plist:
<key>NSCameraUsageDescription</key>
<string>Camera access is required for eKYC verification</string>

Troubleshooting

  • If you encounter build issues on iOS:

    • Clean the build folder: cd ios && xcodebuild clean
    • Remove pods: rm -rf Pods && pod install
  • If you encounter build issues on Android:

    • Clean the project: cd android && ./gradlew clean
    • Rebuild: ./gradlew assembleDebug
  • Common issues:

    • Make sure all required permissions are properly set
    • Verify your credentials (accessToken) are correct
    • Check your internet connection
    • Ensure the device meets the minimum requirements

Support

For support, please contact tung@kalapa.vn

License

Kalapa JSC™ © 2025

Keywords

react-native

FAQs

Package last updated on 17 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts