Skip to main content

Receiving the result

Markdown

The SDK returns the capture result through callbacks defined in the listener interface used during the capture session.

iAcessoBioSelfie
Unico API

onSuccess is only delivered when the camera is opened with a webAppToken — the process.webAppToken returned by Create Process. See User Journeys.

onSuccessSelfie must still be implemented to satisfy the listener interface, but its result is not used in a Unico API integration.

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 fun onSuccess(result: SuccessResult) {
val processId = result.processId
}
onErrorSelfie

Called when an error occurs during capture. Returns an ErrorBio object with a code and description. See Error handling for the full list of error codes and recommended handling.

override fun onErrorSelfie(errorBio: ErrorBio) {
val code = errorBio.code
val description = errorBio.description
}