Three outcomes
Every SDK reports exactly one outcome, exactly once — when the verification closes: the user pressed the cross, Back on Android, Esc on a website, or your code closed it.
| Outcome | When | What you get |
|---|---|---|
| Completed | The user submitted | status — the last status the verification showed |
| Failed | Nothing was submitted and an error was on screen | error.code, error.message |
| Cancelled | Nothing was submitted and there was no error | — |
If several apply, the order is: completed, then failed, then cancelled.
The status of a completed outcome is one of approved, declined, review, resubmission_requested, or still submitted or processing. The last two mean the decision has not been made yet: that is normal, wait for the webhook.
| Platform | Completed | Cancelled | Failed |
|---|---|---|---|
| Website | onComplete({status, sessionId}) |
onCancel({sessionId}) |
onError({code, message, sessionId}) |
| iOS | .completed(VeriffyStatus) |
.cancelled |
.failed(VeriffyError) |
| Android | VeriffyResult.Completed(status, sessionId) |
Cancelled(sessionId) |
Failed(VeriffyError) |
| React Native | onComplete({status, sessionId}) |
onCancel({sessionId}) |
onError({code, message, sessionId}) |
| Flutter | VeriffyCompleted(status) |
VeriffyCancelled() |
VeriffyFailed(VeriffyError) |
A completed outcome may carry a reasons list — the codes the verification showed the user with the status, for example why a resubmission is needed.
The verification does not close by itself
On its last screen it stays open until the user closes it. To close it straight away, do it from your handler of the completed event.
Error codes
| Code | Source | What to do |
|---|---|---|
expired |
Verification | The link has expired. Create a new verification |
invalid_link |
Verification | The link is unknown or revoked. Create a new verification |
camera_denied |
Verification, SDK | No camera access. The mobile SDKs show a screen that leads to Settings |
network |
Verification, SDK | No connection to VERIFFY, or the page did not load. Retry |
invalid_url |
SDK | The address passed to the SDK is not https |
webview_unavailable |
Android SDK | The device has no usable Android System WebView |
The list can grow: handle an unknown code as a general error.
Events
While the verification is open, the SDK passes its events to onEvent. They are for a progress indicator and analytics, not for access decisions.
{
"source": "veriffy",
"version": 1,
"event": "step",
"session_id": "6f1d0c9e-…",
"data": {"step": "face", "index": 3, "total": 3}
}| Event | Data | Meaning |
|---|---|---|
ready |
— | The page has loaded |
step |
step, index, total |
The user moved to a step: consent, document, face. index counts from one |
submitted |
— | All steps are done; processing has started |
completed |
status |
The last screen is shown |
cancelled |
— | The user pressed the cross |
error |
code, message |
An error is shown. It is not necessarily final: the user may retry |
An error counts as showing from an error event until the next ready, step, submitted or completed.