Thai Bank Book OCR
Skip the camera work — our free open-source eKYC SDK (Web, Flutter, iOS, Android & React Native) auto-captures documents and faces and calls this API for you. View on GitHub.
The Thai Bank Book OCR API extracts the bank name, account number, account name, and branch from Thai bank passbook images, and detects whether the page carries a signature. It supports passbooks from the major Thai banks. The production service processes a page in 0.2 seconds (median) and sustains 29,000 pages per hour; see Accuracy for what to rely on and what to treat as advisory.
Live Demo
Upload a Thai bank passbook image, or use the synthetic specimen below.
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
Try the SDK (Live Camera)
Prefer not to upload a file? The free open-source iApp eKYC Web SDK captures the bank book automatically from your camera — it detects the page boundary, waits for a sharp stable frame, perspective-corrects the image, and submits it to this API. See more flows on the full SDK live demo page.
Loading live demo…
Quick Start
You need an API key from the API Key Management page. Send the image as multipart/form-data:
curl -X POST https://api.iapp.co.th/v3/store/ekyc/book-bank \
-H "apikey: YOUR_API_KEY" \
-F "file=@bankbook.jpg"
{
"status": "success",
"bank_name": "ไทยพาณิชย์ (SCB)",
"account_number": "0123456789",
"account_name": "บริษัท ไอแอพพ์เทคโนโลยี จำกัด",
"bank_branch": "ฟิวเจอร์ พาร์ค รังสิต",
"signature_detected": true
}
Endpoints and Pricing
| Endpoint | Output | Price |
|---|---|---|
POST /v3/store/ekyc/book-bank | JSON with bank name, account number, account name, branch, and signature detection | 1.25 IC per page |
The legacy paths /book-bank-ocr and /book-bank-ocr/file remain supported at the same price. For on-premise deployment, see Data Security.
Performance
Measured on the production service, August 2026.
| Metric | Value |
|---|---|
| Median processing time | 0.2 s per page |
| Sustained throughput | 8.2 pages per second (29,000 pages per hour) |
| Maximum file size | 10 MB |
| Supported input formats | JPEG, JPG, PNG |
| Supported banks | SCB, Bangkok Bank, Krungthai, Kasikorn, Krungsri, TMB |
Accuracy
| Field | Accuracy |
|---|---|
| Bank name | 99.5% |
| Account number | 96.8% |
| Account name | 52.6% |
| Bank branch | 63.1% |
Rely on the machine-readable fields — bank name, account number, and account type — and treat the free-text account_name and bank_branch as advisory: passbooks vary widely in layout, print quality, and wear, so verify those two against another source when they matter. The recognition engine was upgraded in August 2026 and audited field by field against the previous engine on identical passbook images: 99.45 percent overall agreement, with the account number, bank name, and account type identical on every book tested, and no field removed or changed type. Details in the whitepaper:
Download the engine audit whitepaper (PDF)
Data Security and Compliance
- The service is GDPR and PDPA compliant.
- Uploaded images are processed in memory and are not retained after the response is returned.
- A fully self-contained on-premise deployment is available, in which no passbook data leaves your infrastructure. Contact us for details.
Technical Reference
Request
POST with multipart/form-data and the apikey header.
| Parameter | Required | Description |
|---|---|---|
file | Yes | Thai bank passbook image (the account-information page) |
Response
{
"status": "success",
"processing_time": 0.2,
"bank_name": "ไทยพาณิชย์ (SCB)",
"account_number": "0123456789",
"account_name": "บริษัท ไอแอพพ์เทคโนโลยี จำกัด",
"bank_branch": "ฟิวเจอร์ พาร์ค รังสิต",
"signature_detected": true
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | String | success or an error status |
processing_time | Float | Processing time in seconds |
bank_name | String | Issuing bank |
account_number | String | Account number |
account_name | String | Account holder name (advisory — see Accuracy) |
bank_branch | String | Branch name (advisory — see Accuracy) |
signature_detected | Boolean | Whether a handwritten signature was found on the page |
Code Examples
- cURL
- Python
- JavaScript
- PHP
- Swift
- Kotlin
- Java
- Dart
curl -X POST https://api.iapp.co.th/v3/store/ekyc/book-bank \
-H "apikey: YOUR_API_KEY" \
-F "file=@bankbook.jpg"
import requests
url = "https://api.iapp.co.th/v3/store/ekyc/book-bank"
headers = {"apikey": "YOUR_API_KEY"}
files = {"file": open("bankbook.jpg", "rb")}
response = requests.post(url, headers=headers, files=files)
print(response.json())
const axios = require("axios");
const FormData = require("form-data");
const fs = require("fs");
const data = new FormData();
data.append("file", fs.createReadStream("bankbook.jpg"));
axios.post("https://api.iapp.co.th/v3/store/ekyc/book-bank", data, {
headers: { apikey: "YOUR_API_KEY", ...data.getHeaders() },
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.iapp.co.th/v3/store/ekyc/book-bank',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => array(
'file' => new CURLFILE('bankbook.jpg')
),
CURLOPT_HTTPHEADER => array(
'apikey: YOUR_API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
import Foundation
let url = URL(string: "https://api.iapp.co.th/v3/store/ekyc/book-bank")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.addValue("YOUR_API_KEY", forHTTPHeaderField: "apikey")
let boundary = "Boundary-\(UUID().uuidString)"
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
var body = Data()
body.append("--\(boundary)\r\n".data(using: .utf8)!)
body.append("Content-Disposition: form-data; name=\"file\"; filename=\"bankbook.jpg\"\r\n".data(using: .utf8)!)
body.append("Content-Type: image/jpeg\r\n\r\n".data(using: .utf8)!)
if let fileData = try? Data(contentsOf: URL(fileURLWithPath: "bankbook.jpg")) {
body.append(fileData)
}
body.append("\r\n--\(boundary)--\r\n".data(using: .utf8)!)
request.httpBody = body
URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data {
print(String(data: data, encoding: .utf8)!)
}
}.resume()
import okhttp3.*
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody.Companion.asRequestBody
import java.io.File
val client = OkHttpClient()
val file = File("bankbook.jpg")
val requestBody = MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("file", file.name, file.asRequestBody("image/jpeg".toMediaTypeOrNull()))
.build()
val request = Request.Builder()
.url("https://api.iapp.co.th/v3/store/ekyc/book-bank")
.addHeader("apikey", "YOUR_API_KEY")
.post(requestBody)
.build()
client.newCall(request).execute().use { response ->
println(response.body?.string())
}
import okhttp3.*;
import java.io.File;
OkHttpClient client = new OkHttpClient();
File file = new File("bankbook.jpg");
RequestBody requestBody = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("file", file.getName(),
RequestBody.create(MediaType.parse("image/jpeg"), file))
.build();
Request request = new Request.Builder()
.url("https://api.iapp.co.th/v3/store/ekyc/book-bank")
.addHeader("apikey", "YOUR_API_KEY")
.post(requestBody)
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}
import 'package:http/http.dart' as http;
var request = http.MultipartRequest(
'POST',
Uri.parse('https://api.iapp.co.th/v3/store/ekyc/book-bank'),
);
request.files.add(await http.MultipartFile.fromPath('file', 'bankbook.jpg'));
request.headers.addAll({'apikey': 'YOUR_API_KEY'});
var response = await request.send();
print(await response.stream.bytesToString());
Limitations
- Thai bank passbooks only; handwritten signature detection only.
- Files larger than 10 MB are rejected; supported formats are JPEG, JPG, and PNG.
- Keep the passbook flat, well lit, and free of glare; tilted or shadowed captures reduce accuracy.
Changelog
| Version | Date | Changes |
|---|---|---|
| v1.1.1-20260823 | 23 Aug 2026 | Upgraded recognition engine, roughly 3–5 times faster per page (0.2 s median). Field-by-field audit against the previous engine on identical passbooks: 99.45% agreement, with account number, bank name, and account type identical on every book tested; response contract unchanged. Fully self-contained on-premise deployment available. |
| v2.0 | Aug 2022 | Added signature detection; overall accuracy improved to 93%. |
| v1.0 | 2022 | Initial release. |
