/scandit-sdk:id-capture-webfrom scandit-sdk
Integrates the Scandit ID Capture Web SDK for scanning passports, driver's licenses, ID cards, and visas via MRZ, VIZ, PDF417 barcode, or mobile documents. Covers scanner configuration, CapturedId result handling, rejection rules, AAMVA verification, overlay UI, and SDK migration.
Ships in scandit-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Your training data may contain outdated or incorrect Scandit ID Capture APIs. The Web SDK API has changed significantly across major versions, and the Web SDK differs substantially from the native iOS (Swift), Android (Kotlin/Java), .NET, Flutter, and React Native SDKs. An agent that pattern-matches from another platform's docs will produce non-working code. Two Web-specific facts dominate:
Promise and must be awaited — creating the context, creating the mode, enabling/disabling, applying settings, adding the overlay. There are no synchronous constructors for the mode or overlay.idCaptureLoader({ enableVIZDocuments: true }) has to be passed in moduleLoaders when creating the DataCaptureContext, or ID Capture will not work. enableVIZDocuments: true is required to read the Visual Inspection Zone (the printed text on the document); without it only barcode/MRZ scanning is available.Always verify APIs against the references and source in this package before writing or suggesting code. The most common sources of wrong code:
supportedDocuments (a bitmask), supportedSides, and session-based callbacks were replaced. Do not emit any of these.settings.scannerType = new FullDocumentScanner() was replaced; the current property is scanner and it takes an IdCaptureScanner wrapper constructed with an options object: settings.scanner = new IdCaptureScanner({ physicalDocument: new FullDocumentScanner() }).IdCapture(context:settings:), Android uses IdCapture.forDataCaptureContext(...), .NET uses IdCapture.Create(...). The Web API is await IdCapture.forContext(context, settings).isEnabled — on Web this is the method idCapture.isEnabled() to read and await idCapture.setEnabled(true) to set. It is NOT an assignable property.rejectForgedAamvaBarcodes setting. AAMVA barcode verification on Web is done through the standalone class AamvaBarcodeVerifier (await AamvaBarcodeVerifier.create(context), then await verifier.verify(capturedId)). Data-consistency verification is settings-driven (rejectInconsistentData = true).capturedId.images.face / .getFrame(IdSide.Front) / .getCroppedDocument(IdSide.Back) return string | null (a data:image/... URL), suitable for an <img> src. They are only populated when enabled via settings.setShouldPassImageTypeToResult(IdImageType.Face, true).| Do NOT write | Use instead |
|---|---|
new IdCapture(context, settings) | await IdCapture.forContext(context, settings) |
IdCapture.forDataCaptureContext(...) / IdCapture.Create(...) | await IdCapture.forContext(context, settings) |
idCapture.isEnabled = true / idCapture.enabled = true | await idCapture.setEnabled(true) (read with idCapture.isEnabled()) |
settings.supportedDocuments = [...] / settings.supportedSides = ... (v6) | settings.acceptedDocuments = [...] + settings.scanner = new IdCaptureScanner({...}) |
settings.scannerType = new FullDocumentScanner() (v7) | settings.scanner = new IdCaptureScanner({ physicalDocument: new FullDocumentScanner() }) |
new IdCaptureScanner(new FullDocumentScanner()) (positional) | new IdCaptureScanner({ physicalDocument: new FullDocumentScanner() }) (options object) |
new IdCaptureOverlay(idCapture, view) | await IdCaptureOverlay.withIdCaptureForView(idCapture, view) |
settings.rejectForgedAamvaBarcodes = true | const v = await AamvaBarcodeVerifier.create(context); await v.verify(capturedId) |
capturedId.barcodeResult | capturedId.barcode |
capturedId.images.croppedDocument(side) / capturedId.images.face() as a method | capturedId.images.getCroppedDocument(IdSide.Front) / capturedId.images.face (a getter) |
DataCaptureContext.initialize(licenseKey) (iOS) / forLicenseKey(...) sync | await DataCaptureContext.forLicenseKey(key, { moduleLoaders: [idCaptureLoader({...})] }) |
Creating the context without idCaptureLoader(...) in moduleLoaders | always include idCaptureLoader({ enableVIZDocuments: true }) |
SDCIdCapture / SDCCapturedId / any SDC-prefixed type | IdCapture / CapturedId (no prefix; import from @scandit/web-datacapture-id) |
Camera.default / camera.switch(toDesiredState:) | Camera.pickBestGuess() / await camera.switchToDesiredState(FrameSourceState.On) |
Based on the user's request, pick the right path before responding:
@scandit/web-id-bolt) → that is ID Bolt, a hosted wrapper around ID Capture, not the in-page ID Capture SDK. Hand off to the id-bolt skill.data-capture-sdk skill. Do not attempt to answer questions about other capture modes from memory.libraryLocation and the headers, then use the Minimal integration shape.acceptedDocuments are rejected with RejectionReason.NotAcceptedDocumentType.FullDocumentScanner, SingleSideScanner(barcode, machineReadableZone, visualInspectionZone), or MobileDocumentScanner. SingleSideScanner takes positional booleans selecting which zone to read.enableVIZDocuments. Reading the printed VIZ (and most full-document scanning) requires idCaptureLoader({ enableVIZDocuments: true }) and a license entitled for VIZ. If the license lacks VIZ entitlement, loading throws IdCaptureErrorCode.InvalidLicenseKeyForVIZProcessing. Barcode-only / MRZ-only flows can run without it.didRejectId, not just didCaptureId. Rejections (Timeout, NotAcceptedDocumentType, DocumentExpired, DocumentVoided, HolderUnderage, InconsistentData, SingleImageNotRecognized, …) are how the user learns why a scan didn't succeed. SingleImageNotRecognized is Web-specific (single-image-upload flows) and usually warrants an idCapture.reset().await idCapture.setEnabled(false) at the top of didCaptureId/didRejectId, then re-enable when the user dismisses the result. Do the same.didFailWithError for recoverable failures. On IdCaptureErrorCode.RecoveredAfterFailure, inform the user and call idCapture.reset() so they start over from the front side.IdCaptureOverlay.setFrontSideTextHint(...) and friends are deprecated. Customize hints via Localization.getInstance().update({ "id.idCaptureOverlay.scanFrontSideHint": "..." }).data-capture-sdk skill — this skill covers ID Capture only.Prerequisites: install @scandit/web-datacapture-core and @scandit/web-datacapture-id (same version) with the project's package manager, and serve the SDK engine files so libraryLocation resolves them (the samples copy them to library/engine/; self-hosted projects typically use sdc-lib). License keys — see Licence key below.
A page without a bundler follows references/cdn.md for loading the SDK.
When the SDK is loaded from a CDN, pin one exact version (for example @8.6.1) in every URL: the import map and libraryLocation. A floating @8 lets the JavaScript and the engine resolve to different releases, which breaks start-up.
This is the canonical structure shared by every sample under web/samples/02_ID_Scanning_Samples/. Use it as the skeleton; adjust documents/scanner/listeners to the task.
import {
Camera,
CameraSwitchControl,
DataCaptureContext,
DataCaptureView,
FrameSourceState,
} from "@scandit/web-datacapture-core";
import {
IdCapture,
IdCaptureSettings,
IdCaptureScanner,
IdCaptureOverlay,
FullDocumentScanner,
IdCard,
Passport,
DriverLicense,
Region,
IdImageType,
RejectionReason,
idCaptureLoader,
type CapturedId,
} from "@scandit/web-datacapture-id";
const view = new DataCaptureView();
view.connectToElement(document.getElementById("data-capture-view")!);
view.showProgressBar();
const context = await DataCaptureContext.forLicenseKey(LICENSE_KEY, {
libraryLocation: new URL("library/engine/", document.baseURI).toString(),
moduleLoaders: [idCaptureLoader({ enableVIZDocuments: true })],
});
view.hideProgressBar();
const camera = Camera.pickBestGuess();
await camera.applySettings(IdCapture.recommendedCameraSettings);
await context.setFrameSource(camera);
await view.setContext(context);
view.addControl(new CameraSwitchControl());
const settings = new IdCaptureSettings();
settings.scanner = new IdCaptureScanner({ physicalDocument: new FullDocumentScanner() });
settings.acceptedDocuments = [new IdCard(Region.Any), new Passport(Region.Any), new DriverLicense(Region.Any)];
settings.setShouldPassImageTypeToResult(IdImageType.Face, true);
const idCapture = await IdCapture.forContext(context, settings);
idCapture.addListener({
didCaptureId: async (capturedId: CapturedId) => {
await idCapture.setEnabled(false);
// read capturedId.fullName, capturedId.dateOfBirth, capturedId.images.face, ...
},
didRejectId: async (_capturedId: CapturedId, reason: RejectionReason) => {
await idCapture.setEnabled(false);
// surface a message based on `reason`
},
});
await IdCaptureOverlay.withIdCaptureForView(idCapture, view);
await idCapture.setEnabled(false); // keep disabled until the camera is on
await camera.switchToDesiredState(FrameSourceState.On);
await idCapture.setEnabled(true);
Only use APIs that exist in this package (@scandit/web-datacapture-id) and the referenced documentation. Do not invent or guess method signatures, parameters, or property names. When unsure whether an API exists or how to call it, fetch the documentation before responding. Do not tell the user to check the docs themselves. After answering, include the relevant link so they can explore further. Never construct or guess documentation URLs — fetch the index page and follow links from there.
Scanning needs a Scandit licence key. For this skill the licence product is sdk and the licence platform is webassembly.
Work through these in order — never block the user on MCP:
The Scandit MCP server is connected — call ensure_scanner_setup with product sdk and platforms webassembly, app_identifier (the app's bundle or application id; for web, its production domain, never localhost) and env_var SCANDIT_LICENSE_KEY. Do not run the command it returns. Then call get_license_key with the key's id, from that result or from list_license_keys; if list_license_keys shows the key is not a trial, ask the user before fetching it. Show at most a masked preview in chat; never print a full key.
It is not connected — tell the user once that they can connect the remote Scandit MCP server, https://ssl.scandit.com/mcp, in their MCP client, then continue from step 1. Do not edit MCP client configuration yourself.
Authentication is browser-based, so it is not supported headless or in CI. The server provisions trial keys only; it never creates, revokes, or modifies production licences.
The user declines, or has no MCP client — they generate a key themselves at https://ssl.scandit.com (no account yet: https://ssl.scandit.com/dashboard/sign-up?p=test) and paste it in.
Then put the key into the code: write it into the licence-key call in place of the placeholder — the key get_license_key returned, or the one the user pastes or gives you — still showing only a masked preview in chat. Do not search the project, its files or the environment for a key.
| Topic | Resource |
|---|---|
| Get Started (Web) | Get Started (Web) |
| Advanced configuration | Advanced (Web) |
| Migration between major SDK versions | 6 → 7 · 7 → 8 |
| Full API reference | ID Capture API (Web) |
| Source of truth | @scandit/web-datacapture-id package |
| Samples | To be found on github |
SingleSideScanner(barcode, mrz, viz); applySettings to change mode at runtime; localized loading text.rejectExpiredIds + rejectInconsistentData, plus standalone AamvaBarcodeVerifier.create(context) / verify(capturedId); DataConsistencyResult.frontReviewImage().notifyOnSideCapture = true, capturedId.isCapturingComplete, SingleImageUploader fallback, IdSide image access.IdCaptureTrigger.ButtonTap (tap-to-scan shutter), single-image upload, image review.VisaLetter, SingleSideScanner freeFormText, allowCloudScanning) — partly internal; verify against source and docs before using. Currently not used except by some customers doing a pilot project.Listener (didEncounterCaptureIssue, didChangeViewfinderHint, didUpdateIdOutline) — marked @internal; do not use in customer code.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub scandit/skills --plugin scandit-sdk87 skills in this plugin
/barcode-capture-androidScandit Barcode Capture (`BarcodeCapture`) in native Android (Kotlin/Java) projects — the low-level, full-control single-barcode scanning mode (BarcodeCapture + DataCaptureView + overlay), without the pre-built SparkScan UI. Use for integration, symbology and scan settings, result handling, overlay customization, SDK version migration (v6→v7→v8), replacing third-party scanners (ZXing, ML Kit), or troubleshooting./barcode-capture-capacitorCapacitor — Scandit Barcode Capture (`BarcodeCapture`) in Capacitor (Ionic) hybrid apps via the Scandit Capacitor plugins (`ScanditCaptureCorePlugin`), the low-level, full-control single-barcode scanning mode (BarcodeCapture + DataCaptureView + BarcodeCaptureOverlay) without the pre-built SparkScan UI, not the browser-only web SDK. Use for integration, symbology settings, result handling, viewfinder and feedback customization, SDK version migration, replacing a third-party scanner (@capacitor-mlkit/barcode-scanning), or troubleshooting./barcode-capture-cordovaCordova — Scandit Barcode Capture (`BarcodeCapture`) in Apache Cordova hybrid apps via the `scandit-cordova-datacapture-*` plugins (global `window.Scandit`), the low-level, full-control single-barcode scanning mode (BarcodeCapture + DataCaptureView + BarcodeCaptureOverlay) without the pre-built SparkScan UI, not the browser-only web SDK. Use for integration, scan settings, result handling, overlay wiring, SDK version migration, replacing a third-party scanner (phonegap-plugin-barcodescanner), or troubleshooting.Other plugins' skills for the same job