Document Processing
Extract structured data from various document types for complete KYC compliance.
Overview
The Document Processing service provides intelligent document analysis across multiple categories including address verification, income verification, and general document scanning.
Base Path: /v1/documents
Available Endpoints
Document Scan - Auto-Detect Any Document
Automatically detect document type and extract relevant data. Routes to specialized extractors based on content analysis.
Endpoint: POST /v1/documents/scan
What it does:
- Auto-detects document type
- Extracts relevant data fields
- Routes to appropriate specialized service
- Returns extracted data with confidence scores
Supported Document Types:
- Address proof (utility bills, lease agreements)
- Income proof (payslips, tax documents)
- Identity documents (Omang, Passport, License)
- Business documents (registration, certificates)
Request:
Code
Response:
Code
Use Cases:
- Universal document processing
- KYC compliance workflows
- Multi-document batch processing
- Unknown document classification
Pricing: BWP 5-8 per document
Address Scan - Extract Address Proof
Extract address information from utility bills, lease agreements, and proof of residence documents.
Endpoint: POST /v1/documents/address/scan
What it does:
- Extracts name, address, issue date
- Supports utility bills, lease agreements, council bills
- Validates address format
- Multi-page PDF support
Supported Documents:
- Utility Bills (Water, Electricity, Internet)
- Lease Agreements
- Landlord Letters
- Council Bills
- Affidavits
- Kgotla Letters
Request:
Code
Response:
Code
Use Cases:
- Address verification for banking
- Proof of residence for SIM registration
- Customer onboarding compliance
- Telecom regulatory requirements
Pricing: BWP 5-8 per document
Income Scan - Extract Income Proof
Extract salary and income information from payslips, tax documents, and employment contracts.
Endpoint: POST /v1/documents/income/scan
What it does:
- Extracts salary details and deductions
- Calculates net income
- Validates tax calculations
- Multi-month processing support
Supported Documents:
- Pay Slips
- Employment Contracts
- P60 Forms
- Tax Certificates (IT12)
- Proof of Income Letters
- Financial Statements
Request:
Code
Response:
Code
Use Cases:
- Loan application processing
- Credit assessment
- Employment verification
- Financial underwriting
Pricing: BWP 5-8 per document
Fraud Detection
Detect document tampering, forgery, and manipulation.
Endpoint: POST /v1/documents/fraud-detect
Status: Coming Q2 2026
What it will do:
- Detect digital manipulation and editing
- Identify forged signatures
- Analyze document authenticity markers
- Check metadata for tampering signs
- Validate watermarks and security features
Multi-Format Support
Supported File Formats
- Images: JPG, JPEG, PNG
- Documents: PDF (single and multi-page)
- Max file size: 10MB per file
- Max files per request: 10 files
Processing Modes
Single Document:
Code
Multiple Documents (Batch):
Code
Multi-page PDF: System automatically processes all pages.
Best Practices
Image Quality
For optimal results:
- Minimum resolution: 1200x800 pixels
- Clear, legible text without blur
- Good lighting without glare or shadows
- Full document visible - all corners in frame
- Flat surface - avoid curved or wrinkled documents
Document Preparation
- Orientation: Ensure documents are right-side up
- Completeness: Include all pages of multi-page documents
- Clarity: Remove any covers or protective sleeves
- Format: PDF preferred for multi-page documents
Error Handling
Handle different confidence levels appropriately:
Code
Integration Examples
JavaScript
Code
Python
Code
Batch Processing
Process multiple documents in one request:
Code
Response Format
All document processing endpoints return a consistent response structure:
Code
Error Codes
| Code | Status | Message | Resolution |
|---|---|---|---|
| 200 | Success | Document processed successfully | - |
| 400 | Bad Request | Invalid file format or missing fields | Check file format and parameters |
| 422 | Unprocessable | Low confidence or validation failed | Improve image quality, retake photo |
| 500 | Server Error | Processing error | Contact support |
Error Response Example:
Code
Pricing
| Service | Price per Request | Volume Discount |
|---|---|---|
| Document Scan | BWP 5-8 | Available for 1000+ requests/month |
| Address Scan | BWP 5-8 | Available for 1000+ requests/month |
| Income Scan | BWP 5-8 | Available for 1000+ requests/month |
| Fraud Detection | TBD (Q2 2026) | - |
Contact [email protected] for volume pricing.
Support
- Email: [email protected]
- API Reference: Full API Docs
- Integration Guides: JavaScript, Python
Related Documentation: