react-native-manual-kyc
v1.0.51
Published
react-native-manual-kyc is a comprehensive React Native package designed to streamline the KYC (Know Your Customer) process within your mobile applications. It offers a user-friendly interface to collect essential user details, perform identity verificati
Downloads
18
Readme
react-native-manual-kyc
react-native-manual-kyc is a comprehensive React Native package designed to streamline the KYC (Know Your Customer) process within your mobile applications. It offers a user-friendly interface to collect essential user details, perform identity verification using recognized identity cards, and optionally facilitate additional document verification to enhance user limits.
This package is about kyc in 3-steps :
Basic information of user like username, address, pincode, phone number etc.
Identity and facial verification through Identity card. (PAN card, adhar card etc.)
Further document verification such as Bank passbook, Electricity bill or any other document valid in your country in case to increase withdrawal and deposit limit.
Installation
npm install react-native-manual-kyc
npm i react-native-image-picker (for document upload) - (required)
For Android :
Sync gradle file;
For IOS:
cd ios
pod install
Usage
KycStep1 Component
The KycStep1 component is used to gather basic user information. Here's a basic usage example:
// sample code to use KycStep1 component
import React from "react";
import { View, Text } from "react-native";
import { KycStep1 } from "react-native-manual-kyc";
// Whichever "type" - key user will pass in array, that particular fields will show up in Step 1.
const fieldsArr = [
{
id: 1,
type: "Full Name",
customName: "fullname",
customPlaceHolder: "Full Name",
},
{
id: 2,
type: "Address",
customName: "User Address",
customPlaceHolder: "Address",
},
{
id: 3,
type: "Pin Code",
customName: "Pincode",
customPlaceHolder: "Pincode",
},
{
id: 4,
type: "National ID",
customName: "National ID",
customPlaceHolder: "National ID",
},
{
id: 5,
type: "Phone Number",
customName: "Phone Number",
customPlaceHolder: "Phone Number",
},
{
id: 6,
type: "Id Proof",
customName: "Id Proof",
customPlaceHolder: "Select Id Proof",
},
];
let DOCS = [
{ label: "Pan Card", value: "Pan Card" },
{ label: "Aadhaar Card", value: "Aadhaar Card" },
{ label: "Voter Card", value: "Voter Card" },
];
return (
<View style={{ height: "100%", width: "100%" }}>
<KycStep1
fieldsArr={fieldsArr}
DOCS={DOCS}
onPress={(finalArr: any) => {
// all the values of form is present in this variable in array format use these value to submit it to your api
}}
/>
</View>
);
KycStep2 Component
The KycStep2 component handles identity verification. Here's how you can use it:
// sample code to use KycStep2 component
import React from 'react';
import { View, Text } from 'react-native';
import { KycStep2 } from 'react-native-manual-kyc';
const App (props) => {
const handleFrontFile = (uploadedImage: any) => {
// You can use this value to submit it to an API or use it in a state
};
const handleBackFile = (uploadedImage: any) => {
// You can use this value to submit it to an API or use it in a state
};
const handleSelfieFile = (uploadedImage: any) => {
// You can use this value to submit it to an API or use it in a state
};
const handleContinueButton = () => {
// Call this function to submit all above values to your API to complete document verification or perform any other operation
};
return (
<KycStep2
documentName={'Pan Card'} // prop for document name for identity verification
kycDocFrontFile={handleFrontFile} // callback function for getting image file(object) of front side of your document that you uploaded from camera picker
kycDocBackFile={handleBackFile} // callback function for getting image file(object) of back side of your document that you uploaded from camera picker
kycSelfieFile={handleSelfieFile} // callback function for getting image file(object) of selfie that you uploaded from camera picker
onSubmit={handleContinueButton} // onPress function for continue button in the UI that you can use to call API or any other operation you want
/>
);
};
export default App;
KycStep3 Component
The KycStep3 component facilitates additional document verification. Here's a usage example:
// sample code to use KycStep3 component
import React from "react";
import { View, Text } from "react-native";
import { KycStep3 } from "react-native-manual-kyc";
const App = (props) => {
const handleFile = (uploadedImage: any) => {
// You can use this value to submit it to an API or use it in a state
};
const handleContinueButton = () => {
// Call this function to submit all above values to your API to complete document verification or perform any other operation
};
return (
<KycStep3
documentName={"Electricity Bill"} // prop for document name
kycDocFile={handleFile} // callback function for getting image file(object) of front side of your document that you uploaded from camera picker
onSubmit={handleContinueButton} // onPress function for continue button in the UI that you can use to call API or any other operation you want
/>
);
};
export default App;
Keywords
kyc manual custom identity verification
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
[ISC]