Skip to main content

createVerification(options)

string
required
Session token minted by your backend. Never an API key.
HTMLElement
required
The element the flow mounts into.
string
default:"/api/v1/verification"
Endpoint prefix. Set it when Idesify is on another origin, or when you proxy the API through your own domain.
string
BCP-47 tag. Sets Accept-Language so the server localizes its copy, and selects the SDK’s own dictionary. Built-in: en, es, pt, matched on the primary subtag and falling back to en.
"light" | "dark" | "system"
default:"system"
Color scheme for the bundled UI. system follows prefers-color-scheme and re-resolves live when the user flips it.
string
Brand accent, as any CSS color. Overrides the dashboard theme in both light and dark, so you can brand the flow without changing dashboard settings.
UISlots
White-label hooks. labels overrides SDK-owned strings per key; renderTerminal replaces the result screen entirely.
VerificationCallbacks
onStep, onProgress, onComplete, onError, onExpire.
boolean
default:"false"
Skip the intro screen and begin immediately. The intro screen’s language picker and theme toggle are skipped too, so pass the language and colorScheme you want.
InitInput
Only needed if you self-host the engine binary as a separate asset instead of using the inlined default.
boolean
default:"false"
Developer only. Overlays raw detection geometry and a numeric pose readout on the capture screens.
Leave debug off in production. It surfaces raw coordinates and confidence readouts that confuse end users, and it is intended for integration troubleshooting only.

VerificationController

The emitter events are step, progress, complete, error, and expire — the same signals as the callbacks, if you prefer subscribing over passing an options object.

Callbacks

onComplete is the only authoritative signal. onStep and onProgress describe what the user is doing, not what the server concluded — never gate business logic on them.

The capture experience

These behaviors ship in the bundled UI and need no configuration:
  • Press feedback. Primary buttons show an inline spinner on click and disable their siblings, so a tap cannot be double-fired while the next screen prepares.
  • Cropped review. After each document capture the review screen shows only the detected document, not the whole camera frame. This is preview-only and does not change what is submitted.
  • Screen transitions. A light fade and rise between screens; camera previews fade only, to avoid video layout shift. All of it honors prefers-reduced-motion.
  • Attribution. A subtle “Powered by Idesify” mark sits at the bottom of every screen. It is localized and overridable through slots.labels.powered_by.

Theming

The dashboard theme drives the palette. The SDK resolves the effective colors and writes them as --idv-* CSS custom properties on the flow root.
  • accent applies in both light and dark. Neutral surface tokens come from the active mode’s base palette.
  • colorScheme picks light or dark, defaulting to the OS preference.
  • The camera viewfinder uses the ID-1 card aspect ratio with a cover preview and a dimmed mask outside the frame.
For a full white-label, override slots.labels for per-string copy, supply slots.renderTerminal to own the result screen, or set the --idv-* variables yourself on the container.