Apex KYC
Complete Flutter KYC (Know Your Customer) verification SDK with document verification and liveness detection.
Installation 📦
Add this to your package's pubspec.yaml file:
dependencies:
apex_kyc: ^1.0.3
Then run:
flutter pub get
Quick Start 🚀
1. Initialize SDK
import 'package:apex_kyc/index.dart';
void main() {
ApexKycConfig.initialize(
baseUrl: 'https://your-backend-api.com',
apiKey: 'your-api-key', // Optional - Get your API key from https://apexkyc.com/
);
runApp(MyApp());
}
2. Use the Widget
ApexKycFlowWidget(
applicantId: 'your-applicant-id',
onComplete: (verification) {
print('Verification completed!');
},
onError: (error) {
print('Error: $error');
},
)
Complete Example 💡
import 'package:flutter/material.dart';
import 'package:apex_kyc/index.dart';
void main() {
ApexKycConfig.initialize(
baseUrl: 'https://api.apexkyc.com',
apiKey: 'your-api-key', // Get your API key from https://apexkyc.com/
);
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('KYC Verification')),
body: Center(
child: ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ApexKycFlowWidget(
applicantId: 'your-applicant-id',
onComplete: (verification) {
Navigator.pop(context);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Verification completed!'),
backgroundColor: Colors.green,
),
);
},
onError: (error) {
Navigator.pop(context);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Error: $error'),
backgroundColor: Colors.red,
),
);
},
),
),
);
},
child: Text('Start KYC Verification'),
),
),
),
);
}
}
Platform Setup 🔧
Android
Add camera permission to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA"/>
iOS
Add camera usage description to ios/Runner/Info.plist:
<key>NSCameraUsageDescription</key>
<string>Camera access is required for KYC verification</string>
License 📄
See LICENSE file for details.