React Native SDK

The React Native SDK provides a wrapper around the Checker SDK.

The Prembly React Native SDK provides a simple hook to integrate identity verification, KYC, and liveness checks directly into your React native applications with minimal configuration.

Available React Native Packages


Package/SDKEnvironmentDescription
prembly-reactnative-kycReact NativeMobile-native components supporting camera access, document
capture, and biometric checks on iOS/Android.

Quick Start

Install the required packages to get started:

npm install prembly-react-native-kyc react-native-webview

or

yarn add prembly-react-native-kyc react-native-webview

Implementation

import React, { useState } from 'react';
import { Button, View } from 'react-native';
import { PremblyIdentityWidget } from 'prembly-react-native-kyc';
export default function App() {
const [visible, setVisible] = useState(false);
return (
<View style={{ flex: 1, justifyContent: 'center' }}>
<Button title="Verify Identity" onPress={() => setVisible(true)} />
<PremblyIdentityWidget
isVisible={visible}
widgetKey="your_widget_key_here"
widgetId="your_widget_id_here"
firstName="John"
lastName="Doe"
email="[email protected]"
phone="+2348012345678"
metadata={{
user_id: '123456'
}}
callback={(response) => {
console.log('Response:', response);
if (response.status === 'closed' || response.status === 'error_display_closed' || respo
setVisible(false);
}
}}
/>
</View>
);
}

Configuration (Props)


ParameterTypeRequiredDescription
isVisiblebooleanYesControls the visibility of the widget modal
widgetKeyStringYesYour public API key from the Prembly dashboard.
widgetIdStringYesThe specific verification workflow ID created in your dashboard.
emailStringNoThe user's email address
firstNameStringNoUser's first name to pre-fill the form.
lastNameStringNoUser's last name to pre-fill the form.
phoneStringNoUser's phone number.
metadataObjectNoCustom key-value pairs (e.g., transaction_id) passed back in response
callbacks.
callbackFunctionYesFunction executed when verification completes or closes

Troubleshooting (React Native)

  • If the WebView displays a blank screen, ensure react-native-webview is correctly linked and compiled.
  • For Android camera issues, ensure you are requesting runtime camera permissions if compiling for API level 23+

Did this page help you?