📄 Thai Tax Deduction Certificate OCR
Welcome to the Thai Tax Deduction Certificate OCR API, an AI-powered solution developed by iApp Technology Co., Ltd. for extracting data from Thai tax deduction certificates. This documentation will help you integrate and use our OCR service effectively.
Try Demo!
Try Our AI Demo
Login or create a free account to use this AI service demo and explore our powerful APIs.
Get 100 Free Credits (IC) when you sign up!
Offer ends December 31, 2025
Getting Started
-
Prerequisites
- An API key from iApp Technology
- Thai tax deduction certificate images
- Supported file formats: JPEG, JPG, PNG, HEIC, HEIF, PDF
- Maximum file size: 10MB
-
Quick Start
- Fast processing (5-10 seconds per document)
- High accuracy text extraction
- Support for multiple file formats
-
Key Features
- Detailed field extraction including:
- Certificate details (ID, date)
- Payer information (name, address, tax ID)
- Payee information (name, address, tax ID)
- Income details (type, amount, tax withheld)
- Financial summary (total income, total tax withheld)
- Support for both single-page and multi-page documents (PDF)
- Option to return original OCR text and processed images
- Flexible JSON response format with detailed field extraction
- Detailed field extraction including:
-
Security & Compliance
- GDPR and PDPA compliant
- Secure API endpoints
- No data retention after processing
Our API is designed to handle various tax deduction certificate formats and layouts commonly used in Thailand. The post-processing AI model is trained to understand Thai tax document structures and can reliably extract information even from noisy or poorly scanned documents.
Example
Here's a sample Thai tax deduction certificate and its extracted data:
Request:
cURL
curl -X POST https://api.iapp.co.th/ocr/v3/tax-deduction-certificate/file \
-H apikey: YOUR_API_KEY \
-F file=@/path/to/certificate.jpg \
-F return_image=false \
-F return_ocr=false
Please visit API Key Management page to view your existing API key or request a new one.
API Endpoints
| Endpoint | Method | Description | Cost |
|---|---|---|---|
/v3/store/ocr/tax-deduction-certificate/ocr/v3/tax-deduction-certificate | POST | Extract data from Thai tax deduction certificates | 1 IC per page |
Response:
{
"message": "success",
"raw": {},
"processed": {
"documentType": "หนังสือรับรองการหักภาษี ณ ที่จ่าย",
"documentForm": "ภ.ง.ด.3",
"bookNumber": "TX63XXXX",
"documentNumber": null,
"taxDeductor": {
"name": "บริษัท XXXXXXXXXXXXXXXXXXXX จำกัด",
"taxId": "010XXXXXXXX64",
"address": "XXXX XXXXXX XXXXXXXX เขตจอมทอง กรุงเทพมหานคร 10150"
},
"taxpayer": {
"name": "นายXXXXX เป็นตัวอย่าง",
"taxId": "31XXXXXXXX123",
"address": "XXXX XXXXXX XXXXXXXX เขตสาทร กรุงเทพมหานคร"
},
"paymentTypes": [
{
"paymentDate": "02/09/63",
"amount": XXXXX.XX,
"withholdingTax": XXXX.XX
}
],
"totalAmount": XXXXX.XX,
"totalTax": XXXX.XX,
"socialSecurity": {
"amount": null,
"year": null
},
"taxPayerMethod": "ออกภาษีให้ตลอดไป"
},
"template": "tax-deduction-certificate",
"iapp": {
"page": 0,
"char": 3260
},
"process_ms": 46649
}
Features & Capabilities
Core Features
-
Document Processing
- High accuracy text extraction and field recognition
- Thai language support
- Fast processing time of 25-30 seconds per document
- Multi-format support (JPEG, JPG, PNG, HEIC, HEIF, PDF)
- Multi-page document handling
- Option to return original OCR text and processed images
- GDPR and PDPA compliant processing
-
Data Extraction
- Flexible JSON response format with detailed field extraction
Supported Fields
| Field | Type | Description |
|---|---|---|
| documentType | String | Type of tax document |
| documentForm | String | Form type (ภ.ง.ด.1ก, ภ.ง.ด.1ก พิเศษ, ภ.ง.ด.2, ภ.ง.ด.3, ภ.ง.ด.2ก, ภ.ง.ด.3ก, ภ.ง.ด.53) |
| bookNumber | String | Book number of document |
| documentNumber | String | Document number |
| taxDeductor.name | String | Name of tax deductor |
| taxDeductor.taxId | String | Tax ID of tax deductor |
| taxDeductor.address | String | Address of tax deductor |
| taxpayer.name | String | Name of taxpayer |
| taxpayer.taxId | String | Tax ID of taxpayer |
| taxpayer.address | String | Address of taxpayer |
| paymentTypes[].paymentDate | String | Date of payment |
| paymentTypes[].amount | Number | Payment amount |
| paymentTypes[].withholdingTax | Number | Withholding tax amount |
| totalAmount | Number | Total payment amount |
| totalTax | Number | Total withholding tax amount |
| socialSecurity.amount | Number | Social security amount |
| socialSecurity.year | Number | Social security year |
| taxPayerMethod | String | Tax payment method (หักภาษี ณ ที่จ่าย, ออกภาษี ให้ตลอดไป, ออกภาษีให้ครั้งเดียว, อื่นๆ) |
API Reference
Welcome to the Thai Tax Deduction Certificate OCR API, a powerful tool for converting Thai tax deduction certificates into structured JSON data. This API leverages advanced OCR and AI technologies to extract key information such as document details, tax deductor and taxpayer data, payment information, and tax amounts.
Recognizing Tax Deduction Certificate
There are two endpoints available for processing tax deduction certificates:
1. File Upload
POST https://api.iapp.co.th/ocr/v3/tax-deduction-certificate/file
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| apikey | string | Yes | Your API key |
Request Body (multipart/form-data)
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Tax certificate image (JPEG, PNG) or PDF document |
| return_image | boolean | No | Include base64 encoded image in response (default: false) |
| return_ocr | boolean | No | Include raw OCR text in response (default: false) |
Supported File Types
- Images: JPEG, PNG, HEIC, HEIF
- Documents: PDF (up to 10 pages)
Response Format
{
"message": "success",
"raw": {
"image": "string", // Base64 encoded, only if return_image=true
"text": "string" // Only if return_ocr=true
},
"processed": {
"documentType": "string",
"documentForm": "string",
"bookNumber": "string",
"documentNumber": "string",
"taxDeductor": {
"name": "string",
"taxId": "string",
"address": "string"
},
"taxpayer": {
"name": "string",
"taxId": "string",
"address": "string"
},
"paymentTypes": [
{
"paymentDate": "string",
"amount": "number",
"withholdingTax": "number"
}
],
"totalAmount": "number",
"totalTax": "number",
"socialSecurity": {
"amount": "number",
"year": "number"
},
"taxPayerMethod": "string"
},
"template": "tax-deduction-certificate",
"iapp": {
"page": "number",
"char": "number"
},
"process_ms": "number"
}
2. Base64 Image
POST https://api.iapp.co.th/ocr/v3/tax-deduction-certificate/base64
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| apikey | string | Yes | Your API key |
