---
title: Receiving the result
canonical: https://developer.unico.io/developers/sdks-and-tools/flutter/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.

## UnicoSdks

:::info[Unico API]
`onSuccess` is only delivered when the camera is opened with a `webAppToken` — the `process.webAppToken` returned by [Create Process](/developers/api-reference/post-processes). See [User Journeys](/developers/sdks-and-tools/flutter/capture-flow/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.

```dart
@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](/developers/sdks-and-tools/flutter/error-handling) for the full list of error codes.

```dart
@override
void onErrorSelfie(UnicoError error) {
  final code = error.code;
  final description = error.description;
}
```