SDK reference · Incode Web SDK 2 Reference / Web SDK 2 Individual Modules

Antifraud Module

The Antifraud module collects device, browser, and behavioral signals in the background and submits them to Incode's antifraud engine. Fire-and-forget — completes regardless of API outcome so the verification flow is never blocked.

Follows the backend-process pattern. See the patterns page for the shared lifecycle.

Tag

<incode-antifraud> is a standard Web Component. Importing the UI subpath registers the custom element.

import '@incodetech/web/antifraud';
import '@incodetech/web/antifraud/styles.css';

The component is essentially invisible — it runs the check and emits onFinish. You can mount it during transitions while showing your own loading UI.

Properties

Property Type Required Description
config AntifraudConfig No options — type is Record<string, never>
onFinish () => void Called when the check completes
onError (error: string) => void Called on a fatal error (rare — module swallows API errors by design)

Configuration

The module takes no configuration:

type AntifraudConfig = Record<string, never>;

State machine

AntifraudState is minimal — a discriminated union over status:

Status Description
idle Initial state.
processing Collecting signals and submitting to the backend.
finished Terminal — check is done (success or silent failure).

See also

Was this page helpful?