Fraud Verdict

The decision at the end of a review: what was decided, on what basis, by whom. A settled verdict offers to reopen rather than accept a second one, because two conflicting verdicts on one case is the failure this shape prevents.

src/components/ui/fraud-verdict.tsx

About

From the component's own source, where it was written.

The decision panel at the end of a review: what was decided, on what basis, by whom.

Automated and human verdicts are visually distinct. An analyst overriding a model needs to see at a glance whether the thing they are disagreeing with was a rule, a model or a colleague, and "flagged by system" versus "declined by [an analyst]" are different weights of evidence.

A pending verdict shows its actions; a settled one shows who settled it and when, and offers to reopen rather than silently accepting a second decision. Two conflicting verdicts on one case is the failure mode this shape prevents.

Reasons are listed rather than summarised into a sentence. They end up quoted in appeals and chargeback responses, and a paraphrase is not quotable.

Install

npx astralyx-ui add fraud-verdict

Usage

import { FraudVerdict } from '@/components/ui/fraud-verdict'

<FraudVerdict verdict="declined" reasons={reasons} decidedBy="A. Okafor" decidedAt={at} />

Composer

Change the props and the source below follows.

Declinedmanual

Withdrawal po_8fQ21x · £4,120 · user_88213

  • Payout wallet shared with three other accounts
  • Sign-up to first withdrawal in 11 minutes
  • Identity document verified — passport, 11 Aug
by A. Okafor ·
Props
tsx
<FraudVerdict
  verdict="declined"
  reasons={reasons}
  decidedBy="A. Okafor"
  decidedAt={at}
/>

Examples

Every verdict

API

Generated from the source, so it cannot fall behind the code. One table per exported component, then hooks, functions and types.

FraudVerdict

The decision panel at the end of a review: what was decided, on what basis, by whom.

Extends Omit<ComponentProps<'section'>, 'children'>.

PropTypeDefaultDescription
verdictVerdictrequired'approved' | 'declined' | 'review' | 'pending'. Pending shows the actions; anything else shows who decided and when.
subjectReactNode—What was decided on — a withdrawal, an account, a transaction.
reasonsReactNode[]—Listed, not summarised. These get quoted in appeals and chargeback responses, and a paraphrase is not quotable.
decidedByReactNode——
decidedAtDate | string——
automatedbooleanfalseDistinguishes a rule or model from a colleague. An analyst overriding a decision needs to know which they are disagreeing with.
actionsReactNode—Rendered only while pending.
onReopen() => void—The only way past a settled verdict, so a case cannot quietly acquire two.
reopenLabelReactNode'Reopen'—

Types

TypeDefinitionDescription
Verdict
'approved' | 'declined' | 'review' | 'pending'
—