Skip to main content

Receiving the result

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

iAcessoBioSelfie
onSuccessSelfie

Called when the image is captured successfully. Returns a ResultCamera object with:

  • base64 — captured image; can be used to display a preview in your application.
  • encrypted — JWT payload that must be sent to your backend to complete biometric validation via the REST API. Must be submitted within 10 minutes and must be transmitted unchanged — do not parse, re-serialize, or modify it.
override fun onSuccessSelfie(result: ResultCamera) {
val base64 = result.base64
val encrypted = result.encrypted // JWT to send to your backend
}
onSuccess

Called upon successfully completing the WebApp flow. 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
}
iAcessoBioDocument
onSuccessDocument

Called when the document image is captured successfully. Returns a ResultCamera object with:

  • base64 — captured image; can be used to display a preview in your application.
  • encrypted — JWT payload that must be sent to your backend to complete document validation via the REST API. Must be submitted within 10 minutes and must be transmitted unchanged — do not parse, re-serialize, or modify it.
override fun onSuccessDocument(result: ResultCamera) {
val base64 = result.base64
val encrypted = result.encrypted // JWT to send to your backend
}
onErrorDocument

Called when an error occurs during document 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 onErrorDocument(errorBio: ErrorBio) {
val code = errorBio.code
val description = errorBio.description
}