Flutter KYC components
KYC due diligence is one of the steps required to onboard consumers onto your app. Weavr provides a KYC component that you can embed in your app. This lets you provide a seamless experience to your user while capturing the required documentation to verify their identity.
Start KYC
Once setup is done you are ready to present the SDK on the screen.
WeavrComponents().startKyc(
reference,
locale: "en",
kycCompleteListener: KYCCompleteListeners(
onKYCSuccess: (result) async {
kDebugPrint("on success$result");
return null;
},
onKYCFailure: (error) async {
kDebugPrint("on error${error.message}");
return null;
}),
kycListeners: KYCListeners(
onTokenExpirationHandler: () async {
kDebugPrint("token expired");
return newAccessToken; //here we should pass a valid access token
},
onKycException: (map) {
kDebugPrint(map);
},
onStatusChangeHandler: (state) {
kDebugPrint(state);
},
onKycFailed: (map) {
kDebugPrint(map);
},
onKycTerminate: (map) {
kDebugPrint(map);
},
onKycEvent: (map) {
kDebugPrint(map);
},
onKycActionComplete: (map) {
kDebugPrint(map);
}
)
);