Skip to main content

Overview

This guide shows you how to verify a government-issued identity document (passport, driver’s license, national ID) using only the Beltic API. This is the fastest path to document verification — no SDK integration, no session management, and no client-side setup required. You will:
  1. Create a document/idv with file declarations and get presigned upload URLs
  2. Upload the document images to the presigned URLs
After the files are uploaded, the document is automatically processed — a verification is created, authenticity checks are run, and data is extracted from the document.

Prerequisites

  • A Beltic API key with documents:write and verifications:write permissions
  • A document image (JPEG or PNG) of a government-issued ID

Step 1: Create the Document

Create a document/idv resource with the files you intend to upload declared in the request body. Since we’re running a standalone verification, we don’t need to link it to a session or account.
The response contains the document ID and presigned upload URLs for each declared file:
For two-sided documents (like a driver’s license or national ID card), declare both files in the request. This improves extraction accuracy and enables additional security checks.

Step 2: Upload the Document Images

Upload each file to its corresponding presigned URL using a PUT request:
The presigned URL expires after the time specified in expires_in (typically 1 hour). Upload your files before it expires.
Once all files are uploaded, the document is automatically processed — Beltic runs the verification, performs authenticity checks, and extracts identity data from the document. No additional API call is needed.

Retrieving the Results

After uploading, poll the document to check when processing is complete:
When the status changes from pending to processed, the document response includes all extracted data and the linked verification with check results:
You can also retrieve the verification directly to inspect individual check results:

Verification Response

Interpreting Results

Overall Status

Key Checks to Monitor

For most use cases, pay attention to these checks:
  • status_optical — Was the document successfully read?
  • optical_expiry — Is the document expired?
  • optical_mrz — Does the MRZ (machine-readable zone) validate?
  • optical_security — Do security features check out?
  • image_quality_* — Was the image quality sufficient?

Handling Failures

Complete Example

Here’s a complete Node.js example that runs a document verification end-to-end:

Tips for Best Results

  • Use high-resolution images (at least 300 DPI)
  • Ensure even lighting with no glare or shadows
  • Capture the full document with all edges visible
  • Place the document on a dark, contrasting background
For documents with information on both sides (e.g., driver’s licenses), declare and upload both images. This enables:
  • More complete data extraction
  • Additional security checks
  • Better overall verification accuracy
The IDV verification engine supports a wide range of government-issued documents:
  • Passports
  • Driver’s licenses
  • National identity cards
  • Residence permits
  • Travel documents
  • And many more

Next Steps