---
title: Receiving the result
canonical: https://developer.unico.io/dual-api/developers/sdks-and-tools/android/capture-flow/receiving-the-result
locale: en
generated_by: markdown-export
---

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.

  ### Kotlin

    ```kotlin
    override fun onSuccessSelfie(result: ResultCamera) {
      val base64 = result.base64
      val encrypted = result.encrypted // JWT to send to your backend
    }
    ```

### Java

    ```java
    @Override
    public void onSuccessSelfie(ResultCamera result) {
      String base64 = result.getBase64();
      String encrypted = result.getEncrypted(); // 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.

   ### Kotlin

    ```kotlin
    override fun onSuccess(result: SuccessResult) {
      val processId = result.processId
    }
    ```

### Java

    ```java
    @Override
    public void onSuccess(SuccessResult result) {
      String processId = result.getProcessId();
    }
    ```

****`onErrorSelfie`****

Called when an error occurs during capture. Returns an `ErrorBio` object with a code and description. See [Error handling](/developers/sdks-and-tools/android/error-handling) for the full list of error codes and recommended handling.

  ### Kotlin

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

### Java

    ```java
    @Override
    public void onErrorSelfie(ErrorBio errorBio) {
      String code = errorBio.getCode();
      String description = errorBio.getDescription();
    }
    ```

## 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.

  ### Kotlin

    ```kotlin
    override fun onSuccessDocument(result: ResultCamera) {
      val base64 = result.base64
      val encrypted = result.encrypted // JWT to send to your backend
    }
    ```

### Java

    ```java
    @Override
    public void onSuccessDocument(ResultCamera result) {
      String base64 = result.getBase64();
      String encrypted = result.getEncrypted(); // 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](/developers/sdks-and-tools/android/error-handling) for the full list of error codes and recommended handling.

  ### Kotlin

    ```kotlin
    override fun onErrorDocument(errorBio: ErrorBio) {
      val code = errorBio.code
      val description = errorBio.description
    }
    ```

### Java

    ```java
    @Override
    public void onErrorDocument(ErrorBio errorBio) {
      String code = errorBio.getCode();
      String description = errorBio.getDescription();
    }
    ```