bynn_id_verification 1.0.0 copy "bynn_id_verification: ^1.0.0" to clipboard
bynn_id_verification: ^1.0.0 copied to clipboard

BynnIDVerification is a powerful SDK that enables seamless identity verification in your Flutter applications

Bynn Flutter SDK #

The Bynn Flutter SDK provides comprehensive identity verification and KYC (Know Your Customer) capabilities for Flutter applications. Integrate advanced document verification, liveness detection, and age verification seamlessly into your mobile app.

Features #

  • Document Verification: Capture and verify government-issued IDs and passports
  • Liveness Detection: Advanced facial recognition with anti-spoofing technology
  • Age Verification: Streamlined liveness-only flow for age verification
  • Phone & Email Verification: Multi-factor authentication via OTP
  • Real-time Processing: WebSocket-based status updates
  • Multi-language Support: Localized UI
  • Native Performance: iOS and Android native integration with optimized camera handling

Requirements #

  • Flutter SDK: >=3.6.0 <4.0.0
  • iOS: >=12.0
  • Android: >=API 21
  • Dart SDK: >=3.0.0

Installation #

Add the dependency to your pubspec.yaml:

dependencies:
  bynn_id_verification: ^1.0.0

Then run:

flutter pub get

iOS Setup #

Add camera permissions to your ios/Runner/Info.plist:

<key>NSCameraUsageDescription</key>
<string>Camera access is required for document and identity verification</string>

Android Setup #

Add camera permissions to your android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.CAMERA" />

Usage #

Basic Integration #

import 'package:bynn_id_verification/bynn.dart';

// Present verification flow as a modal
await BynnIDVerification.shared.presentVerificationFlow(
  context: context,
  apiKey: 'your_api_key_here',
  kycLevel: 'your_kyc_level',
  uniqueId: 'user_unique_identifier',
  firstName: 'John',
  lastName: 'Doe',
  phoneNumber: '+1234567890',
  email: 'john.doe@example.com',
  onVerificationCompleted: () {
    print('Verification completed successfully!');
  },
  onVerificationCancelled: () {
    print('Verification was cancelled by user');
  },
  onVerificationError: (error) {
    print('Verification failed: $error');
  },
);

Age Verification Flow #

For age verification:

await BynnIDVerification.shared.presentVerificationFlow(
  context: context,
  apiKey: 'your_api_key_here',
  kycLevel: 'your_kyc_level',
  uniqueId: 'user_unique_identifier', // required 
  ageVerification: true, // Enable age verification mode
  onVerificationCompleted: () {
    print('Age verification completed!');
  },
  onVerificationError: (error) {
    print('Age verification failed: $error');
  },
);

Configuration Options #

Parameter Type Required Description
apiKey String Yes Your Bynn API key
kycLevel String Yes Verification level provided by Bynn
uniqueId String Yes (age verification) Unique user identifier (non-PII)
firstName String No User's first name
lastName String No User's last name
phoneNumber String No User's phone number for verification
email String No User's email for verification
ageVerification bool No Enable age verification mode (default: false)
showCompletionView bool No Show completion screen (default: true)

Verification Flow Types #

Determined per KYC

Age Verification Flow #

A streamlined flow for age verification:

  1. Consent: User consent for age verification
  2. Liveness Detection: Facial verification for age estimation
  3. Processing: Age verification through facial analysis
  4. Completion: Age verification result

Error Handling #

The SDK provides comprehensive error handling through callback functions:

onVerificationError: (String error) {
  // Handle different error scenarios
  if (error.contains('network')) {
    // Handle network connectivity issues
  } else if (error.contains('document')) {
    // Handle document-related errors
  } else if (error.contains('liveness')) {
    // Handle liveness detection failures
  }
  
  // Show user-friendly error message
  showDialog(
    context: context,
    builder: (context) => AlertDialog(
      title: Text('Verification Error'),
      content: Text(error),
      actions: [
        TextButton(
          onPressed: () => Navigator.of(context).pop(),
          child: Text('OK'),
        ),
      ],
    ),
  );
}

Support #

License #

This project is licensed under the MIT License - see the LICENSE file for details.