Integration steps to create workflow and start jamming :
HyperKyc npm plugin is available on npmjs - [react-native-hyperkyc-sdk](https://www.npmjs.com/package/react-native-hyperkyc-sdk)
Run the following command in your react-native project directory
npm install react-native-hyperkyc-sdk
- Make sure that the minimum SDK version is 21 or higher
- Enable
multidex
- Open
android/build.gradle
file and add the following lines insideallprojects
function
allprojects {
repositories {
google()
mavenCentral()
maven {
url = "s3://hvsdk/android/releases"
credentials(AwsCredentials) {
accessKey = "aws_access_key" // get this from the team
secretKey = "aws_secret_pass"// get this from the team
}
}
}
}
- Sync the project
cd
to iOS directory and runpod install
- Add Camera Permissions to request the user for camera permissions, add this key-value pair in your application's info.plist file.
- Key : Privacy - Camera Usage Description
- Value : "Access to camera is needed for document and face capture"
-
Create a workflow config dictionary in order to launch the HyperKYC SDK from react-native
import { NativeModules } from 'react-native'; const { Hyperkyc } = NativeModules // ... var configDictionary = {}; configDictionary["appId"] = appID configDictionary["appKey"] = appKey or configDictionary["accessToken"] = accessToken <!-- configDictionary["defaultLangCode"] = "" --> var inputsDictionary = {}; inputsDictionary["bvnNumber"] = "number-123" inputsDictionary["image"] = "image-path" configDictionary["inputs"] = inputsDictionary configDictionary["transactionId"] = transactionId configDictionary["workflowId"] = "workflow-id"
In order to use the SDK, you can either use
appId
,appKey
flow or theaccessToken
flow-
appId (
appId
) & appKey (appKey
) Flow:appKey
- AppKey that is given to you in order to use the Hyperverge’s SDK
appId
- AppID that is given to you in order to use the Hyperverge’s SDK.
-
accessToken
- accessToken can be generated by using this section
-
transactionId
(Mandatory)- The transactionId that has to be used when the SDK tries to create an user session for every KYC flow.
workflowId
(Mandatory)
-
- The workflowId that is used to fetch the custom workflow config for the appId. This can be obtained from Hyperverge Dashboard.
-
Launch HyperKyc
// Launch HyperKyc using launch() function Hyperkyc.launch(configDictionary, function(result){ console.log(result) })