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:- Create a
document/idvwith file declarations and get presigned upload URLs - Upload the document images to the presigned URLs
Prerequisites
- A Beltic API key with
documents:writeandverifications:writepermissions - A document image (JPEG or PNG) of a government-issued ID
Step 1: Create the Document
Create adocument/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.
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.Retrieving the Results
After uploading, poll the document to check when processing is complete:pending to processed, the document response includes all extracted data and the linked verification with 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
Image Quality
Image Quality
- 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
Two-Sided Documents
Two-Sided Documents
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
Supported Document Types
Supported Document Types
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
- Need sessions? Learn how to run verifications within a session for full onboarding flows
- API Reference: See the complete Document IDV API reference