Quick Start

Use this guide to get the Verifier SDK rendering a verification flow in your React Native application.

Complete Installation First

Make sure you have installed the SDK and its peer dependencies before following this guide. See the Installation page. If your app uses NFC delivery of the verification request, also complete the Permissions setup before testing on device.

Component-Based Integration (Recommended)

Use VerificationView for the full verification flow with built-in UI:

import {
  createVerifierSDK,
  VerificationView,
} from '@vecu/verifier-react-native-sdk';

const sdk = createVerifierSDK({
  stage: 'sandbox',
  bearerToken: 'your-vecu-api-token',
});

function VerifyScreen() {
  return (
    <VerificationView
      sdk={sdk}
      vin='1HGBH41JXMN109186'
      proximity={{ thresholdMiles: 5.0 }}
      enableNfcDelivery
      hostHandlesResults
      onApproved={result => {
        console.log('Verified!', result.requestId);
        // Navigate to your app's approved screen here
      }}
      onDenied={result => {
        console.log('DO NOT RELEASE', result.requestId);
        // Navigate to your app's denied screen here
      }}
      onExpired={result => {
        console.log('Session expired');
        // Navigate to your app's expired screen here
      }}
      onError={error => {
        console.error(error.code, error.message);
      }}
    />
  );
}

VerificationView handles all states: loading, QR code display with countdown timer, approved (with proximity pass/fail/unchecked), denied, expired, and error.

Callbacks vs SDK Events

When you use VerificationView, the recommended integration point is the callback props:

  • onApproved
  • onDenied
  • onExpired
  • onError

These are plain functions your screen passes into the component. Internally, the SDK listens to sdk.on('status:changed') and invokes your callbacks when a terminal status arrives.

Use hostHandlesResults when your app wants to render its own approved, denied, and expired screens. With hostHandlesResults={true}, the SDK completes the verification flow and invokes your callbacks, but suppresses its built-in terminal result screens so you can navigate to your own UI.

Next Steps