Detection mode
Who decides what document is being photographed.AUTO is right for most integrations: it is one less screen, and the SDK is better at
reading a document than a user is at classifying their own.
USER_SELECT is worth it when your users routinely carry several accepted documents and
you want to steer them, or when your support team needs to know what the user believed
they were photographing. That intent comes back as a DOCUMENT_TYPE_MISMATCH warning
when it disagrees with what was actually extracted.USER_SELECT_STRICT is the strictest and the most fragile: a user who picks the wrong option fails a document that would otherwise have been fine. Reach for it only when you genuinely need to force one specific document, and remember that document_eligibility already enforces that server-side — where the user cannot get it wrong.
Capture mode
AUTO produces markedly better images, because the SDK only fires when its own quality
checks pass. MANUAL mostly exists for users who struggle with automatic capture — an
unsteady hand, an unusual document, difficult lighting.
Photo preview
boolean
default:"true"
Shows the captured photo and lets the user confirm or retake before it is uploaded.
DOCUMENT_IMAGE_UNUSABLE issue that
you then have to explain.
Retakes
integer
default:"3"
How many times capture may fail before the flow ends.
0 disables retakes entirely.documentScanMaxRetries on iOS or
DOCUMENT_SCAN_MAX_RETRIES on Android.
Three is a reasonable balance. Raising it much higher rarely converts — a user who has
failed five times usually has a damaged document or a broken camera, and the useful
response is human support, not a sixth attempt.

