Verdicts
How per-check results roll up into the one decision you act on
A verification carries one verdict, and it is the only field you should branch your business logic
on. It is derived from the individual check verdicts by a fixed rule, so the same set of check
results always produces the same answer.
The three verdicts
| Verdict | Meaning | Terminal status |
|---|---|---|
approve | Every required check passed | approved |
reject | At least one required check failed | rejected |
review | Nothing failed outright, but at least one check needs a human | manual_review |
The roll-up rule
Evaluate in this order and stop at the first match.
- If any required check has a verdict of
reject, the verification isreject. - Otherwise, if any check has a verdict of
review, the verification isreview. - Otherwise the verification is
approve.
Optional checks never cause a rejection. They still report their own verdict and reason codes on the check object, so you can apply your own policy to them, for example flagging an account internally without blocking sign-up.
Verdict against status
Keep these two apart, because conflating them is the most common source of integration bugs.
verdict is the decision. status is where the session is in its lifecycle. The verdict is null
until the session settles, and it is authoritative only once status is terminal. A verification
sitting in processing may already have some checks resolved, but the roll-up is not final until
the whole session is.
Never act on a non-terminal verdict
Read status first. If it is not approved, rejected or manual_review, do nothing yet.
Reason codes
reason_codes on the verification is the union of the reason codes of the checks that drove the
verdict. It is empty on a clean approval. Use it to decide what to tell the user, and use the
per-check reason_codes when you need to know which step to send them back to. The vocabulary is
listed in Reason codes.
A worked example
A flow of document (required), liveness (required) and AML screening (optional) produces:
| Document | Liveness | AML | Verification verdict |
|---|---|---|---|
| approve | approve | approve | approve |
| approve | approve | review | review |
| approve | reject | approve | reject |
| review | approve | reject | review |
The last row is the one worth reading twice. The AML check rejected, but it is optional, so it does
not reject the verification. The document check needs a human, so the verification lands in
review.