Part of Misfora

Web Scanner SDK for Passport & ID Document Capture

Add camera-based passport and ID document scanning to your web application. Misfora handles document detection, image quality checks, auto-capture and OCR.

The browser capture layer on top of the Misfora OCR API — the same capture engine that runs Misfora's own guest check-in.

Runs in the browser — nothing to install for your users. Access is set up manually.

Your web app · JavaScript
Misfora.scan({
  token,  // from your backend
  documents: ["passport", "id_card"],
  onComplete(result) {
    // result.document.first_name …
    // result.image — the captured document
  },
});
Captures automatically when the image is usable
Passports (TD3) & ID cards (TD1)
Interface in 5 languages, incl. Arabic (RTL)
What the SDK does

More than opening a camera.

Opening a camera in a browser is easy. Knowing when the frame is actually good enough for OCR is not. The SDK evaluates every frame before it accepts a capture.

Document detection

Finds the document edges in the live camera frame.

Framing & position

Checks that the whole document is inside the guide, at a usable size and distance from the edges.

Rotation & perspective

Rejects tilted frames and documents shot at an angle.

Sharpness

Measures sharpness across the whole document, not just the centre — a blurred corner is caught too.

Brightness & glare

Flags frames that are too dark or have reflections covering the document.

Movement & stability

Waits for a steady frame and blocks capture during sudden jumps — for example when a phone switches camera lenses.

MRZ presence

Looks for the machine-readable zone; for ID cards, confirms its three-line structure right before capture.

Best of several frames

Takes a short series and keeps the sharpest frame that passes every check.

Frame rejected: glare on the document — the SDK waits for a clean shot

Don't capture a photo just because a document is visible. Capture it when the image is usable.

Why this matters for recognition — Why good document capture matters for OCR accuracy; how the scanner works inside — Inside Misfora's Document Capture Engine.

Capture → Extract → Validate

From browser camera to structured data.

camera
→
Web Scanner SDK
→
quality checks & auto-capture
→
Misfora OCR API
→
MRZ & field validation
→
your application

The SDK sends the captured image to the Misfora OCR API and hands your page the result: the extracted fields, a validation result for every field, a review_recommended signal — and the captured document image itself.

Your application decides what to do next: fill a form, ask a person to check, or request another capture.

The result in your page: fields, validation and the captured image
A guided capture experience

Your users don't have to guess when to take the photo.

The scanner opens full-screen on top of your page and guides the user in real time.

1Choose the document
2Position it in the frame
3Ready — captured automatically
4Data in your application
1

Choose the document

Passport or ID card — or upload an existing photo instead.

2

Position it in the frame

The guide frame changes colour as the document is found, aligned and ready. Tilted corners are highlighted.

3

Fix what really matters

Short messages appear only for persistent problems — too dark, glare on the document, a light background, no MRZ found — instead of constantly changing instructions.

4

Automatic capture

No shutter button: the photo is taken as soon as the frame is stable and passes every quality check.

5

Result in your page

The scanner closes and your onComplete callback receives the data.

Built for real-world phones

Camera capture is not the same on every phone.

The capture engine is tuned on real devices, not on a single ideal test phone.

📱

Platform-aware camera settings

Camera settings and frame processing are tuned for different device platforms and capabilities.

🔁

Stability over speed

A capture is accepted only after the frame has been stable for a moment — momentary blur or a hand movement doesn't produce a bad photo.

⚙️

One engine, continuously tuned

The same capture engine powers Misfora's guest check-in, the free scanner and the SDK — tuning improves all of them at once.

Tested on entry-level, mid-range and flagship phones — including POCO C65, Redmi A3, Samsung Galaxy A37, iPhone 8 and iPhone 17 Pro. See the full list of tested devices.

You configure the experience — document types, language, callbacks. Misfora maintains the capture engine and its thresholds.

Two layers, one workflow

Web Scanner SDK or OCR API?

Both use the same recognition. The difference is who captures the image.

Your situationMisfora product
You need browser camera capture and the document dataWeb Scanner SDK (recognition included)
You already capture or upload document images yourselfOCR API
You want camera capture and automatic document extraction in the browserWeb Scanner SDK
You process documents on a server, without a browserOCR API

The SDK always uses the Misfora OCR API for recognition — it is not a standalone capture-only component.

Integration

A simple integration can start with a few lines of code.

Your backend creates a short-lived session; your page opens the scanner with it.

1 · Backend — create a short-lived session

# Your server — your secret API key never reaches the browser
curl -X POST https://misfora.com/v1/sdk/session \
  -H "Authorization: Bearer $MISFORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"allowed_profiles": ["passport", "id_card"], "expires_in": 300}'

# → { "token": "msf_sdk_…", "expires_at": "…" }

2 · Frontend — open the scanner

<script src="https://misfora.com/sdk/v1/misfora-sdk.js"></script>
<script>
  Misfora.scan({
    token,                               // from your backend
    documents: ["passport", "id_card"],
    onComplete(result) {
      // result.document, result.validation, result.review_recommended,
      // result.image (the captured document), result.captureMethod
    },
    onError(error) {
      // e.g. "session_expired" → create a new session
    },
  });
</script>

Every option, the result object, error codes and the integration checklist: read the SDK documentation.

Security

Your API key stays on your server.

The browser never sees your permanent credentials. Your backend exchanges the API key for a short-lived SDK token, and every token is limited:

  • to the website addresses registered for your company;
  • to the document types you allow;
  • to a short lifetime (1–15 minutes);
  • to a maximum number of capture attempts — counted when an image is submitted for processing, even if OCR later fails.

Your company's normal rate limits and monthly quota apply to every scan.

Privacy

Documents are not stored by Misfora.

Document images and extracted identity fields are not stored by Misfora. The result is delivered to your page and nowhere else.

Limited metadata — document type, nationality, processing time and whether review was recommended — is kept for usage tracking and service statistics. Details are in the Security section of the API documentation.

The browser result is application data, not a server-side trust assertion. If your backend needs its own verification, it can send the captured image to the OCR API with your API key.

Supported documents

Passports and ID cards.

Passports

ICAO TD3 — 2-line MRZ.

ID cards

ICAO TD1 — the side with the 3-line MRZ.

Supported document formats: ICAO TD3 passports and ICAO TD1 ID cards with machine-readable zones (MRZ).

The SDK uses document types, not country names, so the same integration works across markets. See the supported documents and countries.

Use cases

For web applications that need document capture.

🏨

Hotels & PMS

Guest registration, online check-in and front-desk document capture.

✈️

Travel & booking

Collect passport details during booking or before arrival.

🚗

Car rental

Capture the customer's passport or ID before vehicle pickup.

📶

Telecom onboarding

Add document capture to SIM and contract registration.

🧾

Registration & onboarding

Any flow where a person currently types document data by hand.

🧩

Custom workflows

Talk to us if your case doesn't fit the list.

Hospitality is our first market; the same technology works for other identity-document workflows. The SDK is a document capture and OCR component — not a complete identity-verification or KYC platform.

See it first

See the same capture engine in action.

The free Misfora scanner uses the same document capture technology that powers the Web Scanner SDK — open it on your phone and scan a passport or ID card. No signup, nothing stored.

📷Try the free document scanner

Why capture quality matters for OCR: how blur affects passport OCR.

Access & pricing

Free test access. Simple volume pricing.

  • Free test accessVolume and duration agreed for your project.
  • Plans from 1,000 scans per monthFor reference: 5,000 scans — $179/month. Includes browser-based document capture, automatic image quality checks, OCR and field validation in one integration.
  • Pricing depends on volumeSDK and API scans share one monthly quota. A scan counts once the image is accepted for processing, whether or not recognition succeeds; requests rejected before processing — such as an invalid key, rate limit or unreadable file — don't count. What counts.

Tell us about your application and expected monthly volume. We'll help you set up a test on your website before you commit to a paid plan.

FAQ

Questions

What is a web document scanner SDK?+
A JavaScript component that turns the user's phone or computer camera into a document scanner inside your web application. Misfora's Web Scanner SDK detects the passport or ID card, checks image quality, captures automatically and returns the recognized document data to your page.
Do users need to install an app?+
No. It runs in the mobile or desktop browser. Your page must be served over HTTPS so the browser can ask for camera access.
Which documents are supported?+
Passports (ICAO TD3) and ID cards with a 3-line MRZ (ICAO TD1). See the supported documents and countries.
Is my API key exposed in the browser?+
No. Your backend creates a short-lived SDK token with your API key; only that token reaches the browser. It expires within minutes, works only from your registered websites and has a limited number of attempts.
What does my application receive?+
The same JSON as the OCR API — document type, names, document number, dates, nationality, issuing country, gender, a validation result per field and review_recommended — plus the captured document image. See the result object.
Can I use the SDK with my own OCR?+
Not at the moment — the SDK sends captured images to the Misfora OCR API. If you already have your own capture flow, the OCR API can be used on its own. If you need capture-only, contact us.
Does the SDK work in mobile browsers?+
Yes — mobile browsers are the main use case. The scanner runs in the phone's browser over HTTPS, uses the rear camera and captures automatically. The same capture engine runs in production in Misfora's guest check-in on Android (Chrome) and iPhone (Safari).
Can I use the SDK on desktop?+
Yes. On a computer with a webcam the scanner works the same way, but many webcams don't have the focus or resolution to read a document reliably — for desktop users, the built-in "upload a photo" option is usually the better path.
Can users upload a photo instead of using the camera?+
Yes. The scanner offers an upload option; Misfora then finds the document in the photo and corrects rotation and perspective on the server before recognition. This is also the fallback for desktop computers with weak webcams.
Which languages does the scanner support?+
English, Turkish, Ukrainian, Spanish and Arabic (shown right-to-left). By default the scanner follows the user's browser language and falls back to English; you can also set the language explicitly.
How much does it cost?+
Test access is free. Paid plans start from 1,000 scans per month; for reference, 5,000 scans cost $179/month, with the Web Scanner SDK and OCR API included. A scan counts once the image is accepted for processing, whether or not recognition succeeds — the SDK's quality checks before capture help avoid spending scans on unusable photos. The price per scan goes down with volume. See Pricing.
Does Misfora store the documents?+
No. Document images and extracted identity fields are not stored; only limited usage metadata is kept. See Privacy above.
Does the SDK verify identity?+
No. It captures the document and extracts and validates its data. Liveness checks, face matching and KYC decisions require other systems.

Build document capture into your web application.

Already capturing images yourself? Explore the OCR API →