MIN KYC NSDL React Native Library

This page will help you get started with NSDL MIN KYC.

Create npmrc File

Create .npmrc file in React Native project root folder with the following information:

@card91:registry=https://registry.npmjs.org
//registry.npmjs.org/:_authToken=ghp_Access_Token

This files direct npm client to look for all packages starting from @github-banc91 in the registry - https://registry.npmjs.org/

As it is a private repository, it would need a private token to access it (ghp_Access_Token)
Please reach out to Card91 team to get this token

Installation

Install the package using npm using the following command:

npm install --save-exact @card91/react-native-sdk

or using yarn:

yarn add --exact @card91/react-native-sdk

📘

Peer Dependencies

Our React Native SDK relies on the react-native-webview library, so please make sure that it is installed before using the SDK.

Usage

Use NsdlMinKycFlow in the place where you need to show the KYC form:

import { NsdlMinKycFlow } from '@card91/react-native-sdk';
export default function App() {
  return (
    <View style={styles.container}>
      <View style={{ backgroundColor: 'blue', height: '80%' }}>
        <NsdlMinKycFlow
          environment="sandbox" /* sandbox or live */
          templateId="" // template id will be provided eg. "Xoltt"
          onEvent={(onEvent) => {
            console.log('onEvent', onEvent);// Event will be trigger based on KYC status and events
          }}
          phoneNumber="" // Need to pass registered mobile number of the card holder eg.+918882077XXX
        />
      </View>
    </View>
  );
}

For NsdlMinKycFlow component takes the following props:

Input props

NameTypeRequiredDescription
environmentstringtrueUse to indicate key for design template
templateIdstringfalseUse "sandbox" for production sandbox environment and "live" for production environment .