A passport gives a parser a gift: the machine-readable zone. A block of capital letters, digits and < fillers along the bottom of the data page, with check digits computed over its fields. Read the zone, recompute the digits, and you know whether the reading holds together before you trust a single field.
A driving licence usually gives you none of that. Most issuers print no machine-readable zone on a licence at all, so there is nothing to recompute. Developers who built their first pipeline on passports often discover this the hard way, when the code path that "validates the MRZ" meets a card with no zone and starts treating a perfectly good licence as an error.
This post is about that case. What a licence carries instead of a zone, what a recognition API can and cannot tell you about it, and how to check the fields yourself when there are no check digits to lean on.
This is the blog of doc.cheap, a Passport and ID OCR API. Read the product part with that in mind.
What a licence carries instead
There is no single licence format. Each issuer designs its own card, and the standards that exist set out what a card should contain and how it should be laid out, not one fixed string to parse.
North America: a barcode on the back. The American Association of Motor Vehicle Administrators publishes the AAMVA DL/ID Card Design Standard for cards issued by its members. Its 2026 edition has an annex titled "Mandatory PDF417 Bar Code", which says: "The PDF417 two-dimensional bar code symbology is the minimum mandatory machine-readable technology that must be present on compliant DL/ID documents." The same annex adds: "All mandatory and optional data must be unencrypted." So a compliant card carries the holder's data twice – printed on the front, and encoded in a two-dimensional barcode that anyone with a decoder can read.
The EU: a standard card model, read off its face. The EU's Your Europe page on licence exchange and recognition describes the current licence as "the new EU standard format (plastic, credit card-sized photo card)". The layout is shared, but what you read off it is the printed text. Older paper licences are still in circulation too: the same page says "If you have an old-style EU licence, you can still use it in all EU countries", and that such a licence must be exchanged "by 2033 at the latest".
The international layer. AAMVA's own page notes that the work towards an international licence standard happens at ISO, and that "The international standard (18013) establishes guidelines in the format and content of motor vehicle driver licenses (DLs)". It lists the technologies the standard addresses, among them "Bar codes, one and two dimensional" and "Optical character recognition". In other words, the standard lets an issuer choose; it does not hand you a zone with check digits.
The practical result for a parser:
| Passport | Driving licence | |
|---|---|---|
| Machine-readable zone | Always, on the data page | Usually none |
| Check digits you can recompute | Yes, over the zone | None, when there is no zone |
| A second copy of the data | The zone | A barcode, where the issuer prints one (usually on the back) |
| Expiry date | Printed on the data page | Printed when the licence has one; some are valid for life |
| What tells you the reading is consistent | The zone against the printed page | Your own checks on the printed fields |
Why "no zone" must not mean "invalid"
If your pipeline started with passports, it probably branches on the zone: passed, go on; failed, ask for a new photo. A licence adds a third answer, and it is the common one.
doc.cheap reports the zone as one verdict, mrz.status, with three values. passed means the zone is present and every check digit validated. failed means a zone was read and something in it did not check out. absent means the document carries none – and then reason, lines and text are all null. The driver's licence guide puts it plainly: "Treat absent as an ordinary outcome, not an error."
The rest of the document is unaffected. A licence is recognised off its printed face like any other document, and meta.status comes back recognized. So the branch you want is not "zone passed or reject" but:
failed– something in a zone did not add up; ask for a better photo.passed– the zone checked out; carry on.absent– there was nothing to check; carry on to your own field checks below.
Reading one with a single API call
A licence goes to the same endpoint as a passport, with the same body: one POST /v1/scans with the photo base64-encoded in JSON. The public sandbox key sk_sandbox_public works without an account. Use a test image with it, never a real licence: every scan made on the public key is kept for one year for the service's own log.
curl -X POST https://api.doc.cheap/v1/scans \
-H "Authorization: Bearer sk_sandbox_public" \
-H "Content-Type: application/json" \
-d "{\"image\": \"$(base64 < licence-front.jpg | tr -d '\n')\"}"
The parts of the answer that matter for a licence look like this. Every value is invented, and the issuing state is UTO, the fictional state specimen documents use:
{
"meta": { "status": "recognized", "billed": true, "confidence": "high" },
"document": {
"country": "UTO",
"number": "DL0000000",
"issue_date": "2024-05-02",
"expiry_date": "2034-05-01",
"is_expired": false,
"days_remaining": 2725
},
"holder": {
"surname": "SPECIMEN",
"given_names": "ALEX JORDAN",
"birth_date": "1990-01-01"
},
"fields": [
{ "id": "dl_class@0", "name": "dl_class", "label": "Driving-licence class",
"category": "document", "value": "B, BE", "language": "English", "confidence": "high" },
{ "id": "authority@0", "name": "authority", "label": "Issuing authority",
"category": "document", "value": "UTOPIA LICENSING OFFICE", "language": "English", "confidence": "medium" }
],
"mrz": { "status": "absent", "reason": null, "lines": null, "text": null },
"authenticity": { "overall": "not_checked", "checks": [] }
}
What to read from it:
fieldsis where the licence-specific data lives. The field catalogue lists what a licence usually carries:surname,given_names,birth_date,document_number,dl_classorpermit_class,issue_date,expiry_date,addressandauthority. Address parts (address_street,address_city,address_state,address_postal_code) are published separately as well as whole. The set is open, so a field the vocabulary does not name is still published, under the categoryother.- Key on
id, notname. A licence printed in two scripts returns one entry per language under the samename; onlyidis unique. document.expiry_date,is_expiredanddays_remainingare computed from the printed expiry date, counted from the day of the scan.
What a barcode adds, and what the API does with it
A decoded barcode gets no group of its own in the response. Its values arrive in fields beside everything else, and images.barcode carries a crop of it when one was cut out.
There is one practical catch. The endpoint reads one image per call, and an issuer that prints a barcode usually puts it on the back of the card. When you need what the barcode carries, send the back as its own scan and merge the two results yourself. That merge is also your best substitute for check digits: two independent readings of the same card, which should agree.
Validating a licence without check digits
With no zone, consistency is your job. None of these checks proves a licence is genuine; they catch misreads and obviously wrong input before it reaches your database.
- Dates in order.
birth_datebeforeissue_date,issue_dateon or before the day of the scan,expiry_dateafterissue_date. A reading that breaks the order is a misread or a bad photo. - Expiry from the document, not from a rule. Validity periods differ by issuer – the EU page's own example is a licence from Cyprus "valid for 15 years, instead of 10 years as in Italy". Read the date off the card; do not compute it.
- Plan for no expiry date. The same EU page mentions "EU driving licences that are valid for life". When no expiry date was read,
expiry_date,is_expiredanddays_remainingarenulltogether, and the deriveddays_to_expirefield isnulltoo. Decide what your flow does then; do not treatnullas either expired or valid by accident. - Category, not just presence. If you need someone licensed for a car, look for that category in
dl_classorpermit_classrather than checking that a licence exists. The value is printed text such asB, BE, so split it before matching, and match on the categories your own jurisdiction defines. - Front against back. Where the card carries a barcode, scan both sides and compare the name, the birth date and the document number. A mismatch is worth a second photo.
- Against what the user typed. Compare
holder.surnameandholder.birth_datewith the form your user filled in, normalised the same way. - Confidence as a signal. Every reading carries a band –
high,mediumorlow. Alowband on a field you depend on is a good reason to ask for a new photo.
What a scan costs when there is no zone
On a live key, a scan draws one credit when the document type was determined and one of three things is true: a zone was read and its check digits passed, five or more fields of the visual zone were read, or a barcode was decoded. A licence therefore bills on the second or third. A photo too poor to yield five fields and no barcode is free. The billing rule has the whole definition.
What OCR does not tell you
Reading a licence and verifying it are different jobs. doc.cheap reads what is printed on the card, and on the back, the barcode. Under the recognition-only scenario authenticity.overall is not_checked, so it does not tell you whether the card is genuine, whether it has been suspended, or whether the person holding it is its owner. If your flow needs any of those, they are separate steps with tools and records built for them.
Try it
The public sandbox key needs no account. Registering gives you 100 free recognitions every month on your own key, enough to build the whole flow – front, back and your own checks. If you are choosing a provider, the passport OCR API comparison puts the published prices side by side, and the driver's licence guide has the call in curl, JavaScript and Python with tips on photographing a glossy card.
A question for you: when a licence has no zone, which check catches the most bad readings in your flow – the dates, the barcode on the back, or something else? Tell us in the comments below.