Upload a multi-page KWSP Borang A contribution form and instantly receive structured JSON: employer details, contribution month, total amount, and the full employee roster with member numbers, IC, wages, employer and employee contributions. Built for payroll audits, contribution reconciliation, and HR data migration.
Every member row from every page is extracted into Senarai_Ahli[] — member number, IC, name, wages, employer + employee contributions.
Pages are analyzed up to 5 at a time, so a 20-page Borang A returns in roughly the time of a 4-page one.
Each page is retried up to 3 times on failure. All-or-nothing semantics — you never get partial results that silently miss employees.
Returns is_pattern_match + is_acceptable with reasons[] — so you can detect non-KWSP uploads early.
Handles both modern Borang A and the legacy format with "JUMLAH BESAR (RM)" total at the bottom of the last page.
Uploads are processed in a private temp directory and removed after the request. Nothing retained on disk by default.
POST multipart/form-data with a single pdf field (≤ 20MB).
Pages are rasterized and processed in parallel; first / middle / last pages use specialized prompts.
Header fields are taken from page 1, all employee rows are merged, and JUMLAH BESAR backfills the contribution total when needed.
{
"result": {
"is_pattern_match": true,
"is_acceptable": true,
"reasons": ["Valid KWSP Borang A"],
"fields": {
"No_Rujukan_Majikan": "E1234567890",
"No_Rujukan_Majikan_Borang": "A 123456",
"Nama_Majikan": "CONTOH SDN BHD",
"Alamat": "NO. 1, JALAN CONTOH...",
"Bulan_Caruman": "DISEMBER 2024",
"Amaun_Caruman": 28450.00,
"Tarikh_Cetak": "15.01.2025",
"Bil_Pekerja": 25,
"Senarai_Ahli": [
{
"No_Ahli": "12345678",
"No_IC": "870503-06-5981",
"Nama_Pekerja": "AHMAD BIN ABDULLAH",
"Upah": 5000.00,
"Caruman_Majikan": 650.00,
"Caruman_Pekerja": 550.00
}
]
}
}
}