Receiving the result
The SDK returns the capture result through callbacks defined in the listener interface used during the capture session.
UnicoSdks
Unico API
onSuccess is only delivered when the camera is opened with a webAppToken — the process.webAppToken returned by Create Process. See User Journeys.
onSuccess
Called upon successfully completing the journey. Returns a SuccessResult object containing a processId used to query the result of the customer validation process via the REST API.
@override
void onSuccess(SuccessResult result) {
final processId = result.processId;
}
onErrorSelfie
Called when an error occurs during capture. Returns a UnicoError object with the code, description and info fields. See Error handling for the full list of error codes.
@override
void onErrorSelfie(UnicoError error) {
final code = error.code;
final description = error.description;
}