Household business books API
Turn sales, expenses and stock movements into the TT 152/2025 books S1a, S2a–S2e and S3a-HKD of a household business, with VAT and PIT, as JSON or XLSX.
Send the transactions (date, doc_no, description, type = sale / expense / purchase / stock_in / stock_out / cash_in / cash_out / other_tax, amount, sector, payment cash or bank, item / quantity / unit_price for stock) or a simple XLSX / CSV cash book in file. The API picks the book set of Thông tư 152/2025/TT-BTC (in force 1/1/2026, replaces TT 88/2021) from the annual revenue: S1a-HKD up to the 1 billion VND threshold (no VAT / PIT), S2a-HKD for VAT and PIT as a % of revenue, and S2b + S2c + S2d + S2e-HKD for the taxable-income method (compulsory above 3 billion); S3a-HKD when other taxes are recorded.
S2a groups revenue by business line with the VAT and PIT of each (PIT only on revenue above the threshold, from the highest-rate line first, with prior_revenue_in_year; −30% PIT in 2026–2027 for revenue ≤ 10 billion). S2c lists revenue and reasonable expenses in the six groups of the form and the PIT at 15 / 17 / 20%. S2d keeps quantity and value per item (weighted-average issues), S2e the cash and each bank account with opening and closing balances.
format=xlsx returns a workbook with one sheet per book laid out like the form (header block, column letters, totals, signature). Feed it the hkd_rows of /v1/vn-marketplace-settlement for platform sales.
Markdown · OpenAPI · Postman · llms.txt
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
transactions | body | array | no | Transactions: {date, doc_no, description, type, amount, sector (distribution, services, production, asset_leasing, real_estate_leasing, agency, digital_content, other), expense_group (materials, wages, depreciation, services, interest, other), payment (cash | bank | none), bank, item, unit, quantity, unit_price}. Max 50,000. | |
file | body | file | no | Or an XLSX / CSV with date, description and amount (or revenue / expense) columns. | |
household | body | object | no | {name, address, tax_code, location} printed in the book headers. | |
tax_method | body | string | no | auto | auto, exempt (S1a), revenue (S2a) or income (S2b–S2e) (alias method). |
annual_revenue | body | number | no | Expected revenue of the year (decides the book set and taxes). | |
prior_revenue_in_year | body | number | no | 0 | Revenue of the year before this period (uses up the threshold). |
opening_cash / opening_bank / opening_stock | body | object | no | Opening balances: number, {bank: amount}, [{item, unit, quantity, amount}]. | |
period_from / period_to / period_label | body | string | no | Period shown as "Kỳ kê khai" (default from the dates). | |
format | body | string | no | json | json or xlsx. |
Example
curl -X POST "https://apibox.io.vn/v1/vn-hkd-books" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"household":{"name":"Hộ kinh doanh Nguyễn Văn A","tax_code":"079123456789","address":"Phường Bến Thành, TP. Hồ Chí Minh"},"annual_revenue":1800000000,"prior_revenue_in_year":900000000,"transactions":[{"date":"2026-10-01","doc_no":"PT01","description":"Bán hàng tạp hóa","amount":300000000,"sector":"distribution","payment":"cash"},{"date":"2026-10-05","doc_no":"PT02","description":"Sửa chữa xe máy","amount":120000000,"sector":"services","payment":"bank","bank":"Vietcombank"}]}'const res = await fetch('https://apibox.io.vn/v1/vn-hkd-books', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"household": {
"name": "Hộ kinh doanh Nguyễn Văn A",
"tax_code": "079123456789",
"address": "Phường Bến Thành, TP. Hồ Chí Minh"
},
"annual_revenue": 1800000000,
"prior_revenue_in_year": 900000000,
"transactions": [
{
"date": "2026-10-01",
"doc_no": "PT01",
"description": "Bán hàng tạp hóa",
"amount": 300000000,
"sector": "distribution",
"payment": "cash"
},
{
"date": "2026-10-05",
"doc_no": "PT02",
"description": "Sửa chữa xe máy",
"amount": 120000000,
"sector": "services",
"payment": "bank",
"bank": "Vietcombank"
}
]
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/vn-hkd-books",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"household": {"name": "Hộ kinh doanh Nguyễn Văn A", "tax_code": "079123456789", "address": "Phường Bến Thành, TP. Hồ Chí Minh"}, "annual_revenue": 1800000000, "prior_revenue_in_year": 900000000, "transactions": [{"date": "2026-10-01", "doc_no": "PT01", "description": "Bán hàng tạp hóa", "amount": 300000000, "sector": "distribution", "payment": "cash"}, {"date": "2026-10-05", "doc_no": "PT02", "description": "Sửa chữa xe máy", "amount": 120000000, "sector": "services", "payment": "bank", "bank": "Vietcombank"}]},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-hkd-books');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"household":{"name":"Hộ kinh doanh Nguyễn Văn A","tax_code":"079123456789","address":"Phường Bến Thành, TP. Hồ Chí Minh"},"annual_revenue":1800000000,"prior_revenue_in_year":900000000,"transactions":[{"date":"2026-10-01","doc_no":"PT01","description":"Bán hàng tạp hóa","amount":300000000,"sector":"distribution","payment":"cash"},{"date":"2026-10-05","doc_no":"PT02","description":"Sửa chữa xe máy","amount":120000000,"sector":"services","payment":"bank","bank":"Vietcombank"}]}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"group": 2,
"method": "revenue",
"revenue": 420000000,
"prior_revenue_in_year": 900000000,
"annual_revenue_used": 1800000000,
"threshold": 1000000000,
"below_threshold": false,
"period": {
"from": "2026-10-01",
"to": "2026-10-05",
"label": "Tháng 10/2026"
},
"books": {
"S2a-HKD": {
"form": "S2a-HKD",
"title": "SỔ DOANH THU BÁN HÀNG HÓA, DỊCH VỤ",
"columns": [
"Số hiệu chứng từ (A)",
"Ngày, tháng (B)",
"Diễn giải (C)"
],
"total_vat": 9000000,
"total_pit": 1330000,
"sectors": [
{
"sector": "distribution",
"name_vi": "Phân phối, cung cấp hàng hóa",
"rows": [
{
"doc_no": "PT01",
"date": "2026-10-01",
"description": "Bán hàng tạp hóa",
"amount": 300000000
}
],
"total": 300000000,
"vat_rate": 1,
"pit_rate": 0.5,
"vat": 3000000,
"pit_taxable_revenue": 300000000,
"pit": 1050000
},
{
"sector": "services",
"name_vi": "Dịch vụ, xây dựng không bao thầu nguyên vật liệu",
"rows": [
{
"doc_no": "PT02",
"date": "2026-10-05",
"description": "Sửa chữa xe máy",
"amount": 120000000
}
],
"total": 120000000,
"vat_rate": 5,
"pit_rate": 2,
"vat": 6000000,
"pit_taxable_revenue": 20000000,
"pit": 280000
}
]
}
},
"notes": [
"PIT reduced by 30% (tax years 2026–2027, annual revenue ≤ 10 billion: NĐ 398/2026/NĐ-CP)."
],
"reviewed": "2026-11-11"
}
Use cases
- Give household sellers the compulsory 2026 books from their sales app
- Turn a bank statement or cash notebook into S2e-HKD
- Prepare quarterly VAT / PIT figures for a household client
- Export books in the TT 152 layout for the tax office
FAQ
Which books does a household need?
Revenue up to 1 billion VND a year: S1a-HKD only. Above that with tax as a % of revenue: S2a-HKD. On the taxable-income method (compulsory above 3 billion): S2b, S2c, S2d and S2e-HKD. S3a-HKD is added for excise, environmental, resource or land taxes.
Why is the threshold 1 billion when TT 152 says 500 million?
TT 152/2025 was written for the 500 million threshold of the 2025 PIT law; NĐ 141/2026/NĐ-CP raised it to 1 billion VND from 1 January 2026, so the API uses 1 billion.
Is the XLSX accepted by the tax office?
Households keep the books themselves and present them on request; the workbook follows the form columns and titles, ready to print and sign. It is not a tax return.
Related APIs
Image Metadata & EXIF
Read image dimensions, format, EXIF camera data, capture settings and GPS location from JPEG, PNG, WebP, HEIC, AVIF, GIF and more – upload or URL.
PDFPDF Metadata
Read PDF metadata: page count, title, author, creator, producer, dates, PDF version, encryption, form fields and the size of each page (A4, Letter…).
PDF₫Quote & Receipt PDF
Generate clean PDF quotations, receipts, orders and simple invoices from JSON, with Vietnamese text, VAT, totals in words and a VietQR code for payment.