WYA Verify SDK for Flutter
Identity verification SDK for Flutter with document scanning, liveness detection, and face matching.
Features
- Document Scanning: Capture and validate ID documents
- Liveness Detection: Verify user presence with anti-spoofing technology
- Face Matching: Compare live face capture against document photo
- Face Enrollment: Register face biometrics for future verification
Platform Support
| Platform | Minimum Version |
|---|---|
| iOS | 14.0+ |
| Android | API 23+ (Android 6.0) |
Android requirements (from plugin 2.0.0 onwards, which bundles WYA Android SDK 4.1.1):
- Android Gradle Plugin 8.1+ in your app
- Java/JDK 17
- Gradle 8.x
If your Flutter app still targets
minSdkVersion 21or uses AGP 7.x, you'll need to upgrade before consuming this version. See the migration notes section below.
iOS requirements (from plugin 2.0.0 onwards, which bundles WYA iOS SDK 2.0.0):
- Xcode 15.0+ (Swift 5.9+); plugin tested with Xcode 16.x
- iOS deployment target 14.0+ in your app's Podfile
- App Attest capability enabled on the Apple Developer portal for the consuming app's bundle ID
SDK Versions
| Platform | Version |
|---|---|
| iOS | 2.5.0 |
| Android | 4.8.0 |
Installation
Add to your pubspec.yaml:
dependencies:
flutter_wya_verify_sdk: ^2.6.0
Usage
Import the SDK
import 'package:flutter_wya_verify_sdk/flutter_wya_verify_sdk.dart';
Identity Verification (Onboarding)
try {
final result = await FlutterWyaVerifySdk.startOnboarding(
OnboardingParams(
publicKey: 'your-public-key',
idType: 'ARG_AUTO',
environment: WyaEnvironment.prod,
),
);
if (result.verified) {
print('Identity verified successfully!');
print('Data: ${result.raw}');
} else {
print('Verification failed');
}
} on WyaError catch (e) {
print('Error: ${e.message} (${e.code})');
}
Supported idType values
| Country | Values | Auto-detection |
|---|---|---|
| Argentina | ARG_1, ARG_2, ARG_3, ARG_4 |
ARG_AUTO |
| Peru | PER_1, PER_2, PER_3, PER_4, PER_5 |
PER_AUTO |
Face Matching
try {
final result = await FlutterWyaVerifySdk.startFaceMatch(
FaceMatchParams(
publicKey: 'your-public-key',
operationId: 'operation-id-from-backend',
nonce: 'unique-nonce',
environment: WyaEnvironment.prod,
),
);
if (result.verified) {
print('Face match successful!');
}
} on WyaError catch (e) {
print('Error: ${e.message}');
}
Face Enrollment
try {
final result = await FlutterWyaVerifySdk.startFaceEnroll(
FaceEnrollParams(
publicKey: 'your-public-key',
operationId: 'operation-id',
nonce: 'unique-nonce',
environment: WyaEnvironment.prod,
),
);
if (result.enrolled) {
print('Face enrolled successfully!');
}
} on WyaError catch (e) {
print('Error: ${e.message}');
}
Accent color and language
Every flow accepts two optional parameters to match the SDK screens to your app:
accentColor: brand color as a#RRGGBBhex string. Applied to buttons, the capture frame and the intro sheets. Invalid values fall back to the default accent.language:'es','es-PE'or'en'. Forces the language of the SDK screens; when omitted, the SDK follows the device language.
final result = await FlutterWyaVerifySdk.startOnboarding(
OnboardingParams(
publicKey: 'your-public-key',
idType: 'ARG_AUTO',
environment: WyaEnvironment.prod,
accentColor: '#493F99',
language: 'es',
),
);
FaceMatchParams and FaceEnrollParams take the same two parameters.
Device identifier
Returns the persistent device id the SDK sends with every operation. Use it to correlate your own backend calls with the SDK's operations.
final deviceId = await FlutterWyaVerifySdk.getDeviceId();
Error Handling
The SDK throws WyaError for all error conditions:
try {
// SDK operation
} on WyaError catch (e) {
switch (e.code) {
case WyaErrorCode.invalidParams:
print('Invalid parameters provided');
break;
case WyaErrorCode.cancelled:
print('User cancelled the operation');
break;
case WyaErrorCode.nativeFailure:
print('Native SDK error: ${e.message}');
break;
case WyaErrorCode.unsupportedPlatform:
print('Platform not supported');
break;
}
}
Migration notes
From 1.1.0 → 2.0.0
Bundles Android SDK 4.1.1 + iOS SDK 2.0.0. Both are major-version bumps with breaking deployment-target changes; consumer apps may need updates before adopting.
Android (consumer app must be on AGP 8.x + JDK 17 + Gradle 8.x):
android/build.gradle:compileSdkVersion 36,targetSdkVersion 36(Google Play 2026 requirement).android/app/build.gradle:minSdkVersion 23(was 21+).android/gradle/wrapper/gradle-wrapper.properties: Gradle 8.x.- Project-level
build.gradle:classpath 'com.android.tools.build:gradle:8.1.4'or newer. gradle.properties:org.gradle.java.homeset to a JDK 17 install (or install JDK 17 system-wide).
iOS (consumer app must be on Xcode 15+ and iOS 14 deployment):
ios/Podfile:platform :ios, '14.0'(was 13.0).- Enable App Attest capability on the Apple Developer portal for the
consuming app's bundle ID. Add
com.apple.developer.devicecheck.appattest-environmentto the app's entitlements (developmentfor Debug,productionfor TestFlight / App Store). - The SDK is consumed via CDN (
s.prepare_commanddownloads the XCFramework onpod install). No manual vendoring needed. - No more Lottie dependency — the iOS SDK 2.0.0 replaced Lottie with
CoreAnimation + SwiftUI. If your Podfile pinned
lottie-iosonly for this SDK, you can drop the pin. - Attaching a debugger is supported in Debug builds of your app only.
API-level: the Dart-facing API (startOnboarding, startFaceEnroll,
startFaceMatch, WyaError, etc.) is unchanged. No code changes needed
in your Dart codebase.
Support
- Documentation: docs.wyasolutions.com
- Email: support@wyasolutions.com
License
Proprietary. See LICENSE for details.
Libraries
- flutter_wya_verify_sdk
- WYA Verify SDK for Flutter