NEWSMRZ Scanner is now part of barKoder.What it means for you →

DOCUMENTATION

Scan results

Getting started

Documentation / Getting started

On this page

A camera scan returns a ScanResult; each document read is an MrzRead. The names below are the JavaScript ones; Dart and C# use the same names in their own style (checkDigitsValid, CheckDigitsValid).

ScanResult

{ "status": "read", "reads": [ { "...": "an MrzRead" } ], "elapsedMs": 2140 }
status When
read The camera closed after a read.
stopped The user closed the camera; reads has what was read, possibly nothing.
timeout Nothing was read within timeoutMs.
permissionDenied The camera permission was refused.
licenseInactive The licence does not allow scanning (see the licence's reason).
error Something failed; see message.

MrzRead

{
  "text": "P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<\nL898902C36UTO7408122F1204159ZE184226B<<<<<10",
  "checkDigitsValid": true,
  "kind": "Passport",
  "fields": { "document_number": "L898902C3", "surnames": ["ERIKSSON"], "given_names": ["ANNA", "MARIA"] },
  "corners": [[120, 410], [980, 405], [982, 520], [121, 526]],
  "isolatedMrz": "data:image/jpeg;base64,..."
}
  • text: the MRZ lines, joined by a line break.
  • checkDigitsValid: true when every ICAO 9303 check digit matches (document number, dates, optional data, composite).
  • kind: the document type that was read.
  • fields: the parsed fields. They are the same on every platform:
    • document_type_raw, document_type_readable
    • issuing_country, nationality
    • surnames, given_names (lists of words)
    • document_number
    • dob_raw, dob_readable (date of birth), sex
    • expiration_date_raw, expiration_date_readable
    • and more as the document has them (optional data, personal number).
  • corners: where the MRZ is in the picture, top left first, clockwise. Null when not known.
  • isolatedMrz: the MRZ alone, straightened, as a JPEG. Only when you ask for it with isolateMrz.

Photos

scanImage returns one MrzRead, or null when there is no MRZ in the picture.

Check digits and names

Check digits cover the document number, the dates and the optional data. They do not cover names, country codes and some characters that look alike. In camera mode a read is therefore confirmed over several agreeing frames. On a photo, use checkDigitsValid and show the result for the user to confirm.

Updated Oct 24, 2026 ยท Questions? Ask us