# React Native
A React Native component to easily integrate the Caisson ID Check flow into your React Native app.
# <CaissonIDCheck />
The Caisson ID Check flow is exposed as a single component. The component is itself a modal that your app can invoke when needed.
import { CaissonIDCheck } from "react-native-caisson";
<CaissonIDCheck
apiKey="<your public Caisson API key>"
onIDCheckCreated={idCheck => console.log(idCheck)}
onIDCheckCompleted={() => console.log("idCheckCompleted")}
/>;
# Required props
Name | Type | Description |
---|---|---|
apiKey | string | Your public Caisson API key. The API key can be found in the Caisson Portal Developer panel |
onIDCheckCreated | function | Fired when the ID Check is created after the button is clicked. The handler will receive an idCheck object with the following fields:
check_exchange_token to your server for retrieving ID Check results. See Exchange Check Token for more details. |
onIDCheckCompleted | function | Fired when your user completes the ID Check flow on their mobile device. The handler will receive the same idCheck object as onIDCheckCreated . |
onIDCheckClosed | function | Fired when your user closes the ID Check modal before completion. The handler receives no payload. |
# Optional props
Name | Type | Description |
---|---|---|
customerID | string | Customer ID to be displayed in the Caisson console |
color | css color string | Your brand color |
visible | boolean | Whether to show the ID Check dialog or not |