Parsing South Indian Bank Statements with AI
Extract structured data from South Indian Bank (SIB) PDF statements using AI. Handle SIB's unique format quirks, cheque transactions, and NRI accounts.
South Indian Bank (SIB), headquartered in Thrissur, Kerala, is one of India's oldest private sector banks with over 950 branches nationwide. Its customer base spans retail banking, NRI accounts, and a significant SME segment across Kerala, Tamil Nadu, and Andhra Pradesh — making SIB statement parsing a frequent need for lenders, accounting software, and wealth management apps built for South Indian markets.
This guide explains how to extract clean, structured JSON from SIB PDFs using Lekha — covering SIB's format quirks, multi-page statements, NRI account types, and production-ready TypeScript examples.
What Makes SIB Statements Unique
SIB issues statements in several formats depending on the account type and how the customer downloads them:
All formats share SIB's characteristic date style (DD-MMM-YYYY, e.g. 15-Oct-2025) and a combined "Cheque/Ref No." column that mixes instrument numbers with UPI transaction IDs and NEFT/RTGS UTR codes.
Vision-AI models handle all four variants without separate parsing logic — the model reads the visual layout rather than relying on fixed column positions. This matters because branch-printed statements are often rotated or skewed, which breaks regex-based parsers.
Quickstart: Parse a SIB Statement
Install the Lekha SDK and send the PDF directly:
import Lekha from "@lekha/sdk";
import { readFileSync } from "fs";
const lekha = new Lekha({ apiKey: process.env.LEKHA_API_KEY });
const pdf = readFileSync("sib-statement.pdf");
const result = await lekha.extract({
document: pdf,
mimeType: "application/pdf",
documentType: "bank_statement",
});
console.log(result.data.bank_name); // "South Indian Bank"
console.log(result.data.account_number); // masked: "XXXXXX1234"
console.log(result.data.opening_balance); // 48250.75
console.log(result.data.closing_balance); // 62180.00
console.log(result.data.transactions.length); // e.g. 87
Try it yourself in the Lekha Playground — upload any SIB PDF without writing a line of code.
Understanding the Extracted Fields
A successful extraction returns a BankStatement object. Here is a representative slice:
{
bank_name: "South Indian Bank",
branch: "Ernakulam Main Branch",
account_number: "XXXXXX5678",
account_type: "Savings",
account_holder: "Meera Krishnan",
ifsc_code: "SIBL0000123",
statement_period: {
from: "2025-04-01",
to: "2025-09-30"
},
opening_balance: 48250.75,
closing_balance: 62180.00,
currency: "INR",
transactions: [
{
date: "2025-04-03",
description: "UPI/GPay/9876543210/Meera K",
cheque_reference: "UPI/412345678901",
debit: null,
credit: 15000.00,
balance: 63250.75,
category: "upi_credit"
},
{
date: "2025-04-07",
description: "NEFT/SBIN0001234/Salary April",
cheque_reference: "NEFTINW250407001",
debit: null,
credit: 75000.00,
balance: 138250.75,
category: "salary"
},
{
date: "2025-04-10",
description: "CHQ/000123/Rent Payment",
cheque_reference: "000123",
debit: 20000.00,
credit: null,
balance: 118250.75,
category: "cheque_debit"
}
]
}
Amounts are always plain numbers — never strings like "₹1,20,000". Dates are always ISO 8601 (YYYY-MM-DD). This makes downstream processing predictable.
Handling SIB NRI Account Statements
NRE and NRO account statements from SIB include additional fields that Lekha surfaces automatically:
const result = await lekha.extract({
document: nriStatementPdf,
mimeType: "application/pdf",
documentType: "bank_statement",
});
// NRI-specific fields
console.log(result.data.account_type); // "NRE Savings"
console.log(result.data.currency); // "INR" (NRE always INR)
// SWIFT/foreign remittance transactions include fx_reference
const remittances = result.data.transactions.filter(
(t) => t.category === "inward_remittance",
);
// { description: "SWIFT/CITIUSXX/USD 2000 @ 84.50", credit: 169000, ... }
For NRO accounts that show both INR and foreign currency lines, Lekha returns the INR equivalent (the settled amount) and includes the original currency reference in description.
Building a SIB Income Verification Agent
Here is a complete agent that takes a SIB statement, extracts salary credits, and produces a verified income summary — useful for loan pre-qualification workflows:
import Lekha from "@lekha/sdk"; import Anthropic from "@anthropic-ai/sdk"; import { readFileSync } from "fs";, }, ], });const lekha = new Lekha({ apiKey: process.env.LEKHA_API_KEY }); const claude = new Anthropic();
async function verifySIBIncome(pdfPath: string) { // Step 1: Extract the statement const pdf = readFileSync(pdfPath); const { data: statement } = await lekha.extract({ document: pdf, mimeType: "application/pdf", documentType: "bank_statement", });
// Step 2: Isolate salary and regular credits const salaryCredits = statement.transactions.filter( (t) => t.credit !== null && (t.category === "salary" || t.description.toLowerCase().includes("salary") || (t.description.toLowerCase().includes("neft") && t.credit > 20000)), );
// Step 3: Summarise with Claude const summary = await claude.messages.create({ model: "claude-sonnet-4-6", max_tokens: 512, messages: [ { role: "user", content:
Given these salary/income transactions from a South Indian Bank statement, calculate the average monthly income, identify the employer if possible, and flag any months with irregular/missing salary:Account: ${statement.account_holder} Period: ${statement.statement_period.from} to ${statement.statement_period.to} Closing Balance: ${statement.closing_balance}
Transactions: ${JSON.stringify(salaryCredits, null, 2)}
Return a JSON object with: { average_monthly_income, employer_name, months_covered, irregular_months, verified: true/false }
const verification = JSON.parse( summary.content[0].type === "text" ? summary.content[0].text : "{}", );
return { account_holder: statement.account_holder, bank: statement.bank_name, account_type: statement.account_type, ...verification, }; }
// Usage const result = await verifySIBIncome("./statement.pdf"); console.log(result); // { // account_holder: "Meera Krishnan", // bank: "South Indian Bank", // account_type: "Savings", // average_monthly_income: 75000, // employer_name: "Infosys Limited", // months_covered: 6, // irregular_months: [], // verified: true // }
Multi-Page and Password-Protected Statements
SIB's net banking portal typically issues 12-month statements as multi-page PDFs (often 4–8 pages for active accounts). Lekha processes the entire PDF in a single call — no need to split pages:
// Multi-page: just send the full PDF as-is
const multiPageResult = await lekha.extract({
document: largeStatementBuffer,
mimeType: "application/pdf",
documentType: "bank_statement",
});
// transactions array covers all pages, deduped and in chronological order
For password-protected PDFs (SIB sometimes uses the account holder's DOB or PAN as password), pre-decrypt with a library before sending — Lekha expects an unlocked PDF:
import { PDFDocument } from "pdf-lib";
async function decryptSIBPdf(
buffer: Buffer,
password: string,
): Promise {
const pdfDoc = await PDFDocument.load(buffer, { password });
const decrypted = await pdfDoc.save();
return Buffer.from(decrypted);
}
const decrypted = await decryptSIBPdf(encryptedBuffer, "01011990"); // e.g. DOB
const result = await lekha.extract({
document: decrypted,
mimeType: "application/pdf",
documentType: "bank_statement",
});
Categorisation: SIB-Specific Transaction Types
South Indian Bank statements include transaction types not common in other banks' exports. Lekha's classifier handles them:
| SIB Description Pattern | Lekha Category |
| ----------------------------------- | -------------------------- |
| UPI/GPay/... or UPI/PhonePe/... | upi_credit / upi_debit |
| NEFT/SBIN.../Salary | salary |
| SWIFT/CITIUSXX/... | inward_remittance |
| CHQ/XXXXXX/... | cheque_debit |
| INT CRD/... (interest credited) | interest |
| ATW/... (ATM withdrawal) | atm_withdrawal |
| SIB LOAN/... (EMI deduction) | loan_emi |
| LIC/NACH/... | insurance_premium |
These categories feed directly into downstream agents — no regex or manual mapping needed.
Production Tips for SIB Parsing
Verify account type before processing. SIB issues Savings, Current, NRE, NRO, and Salary accounts. Theaccount_type field drives downstream logic — NRE credits don't count as taxable income, for example.
Watch for duplicate transactions. SIB sometimes lists a NACH return debit and the corresponding bounce charge as separate line items on the same date with similar amounts. Check both description and cheque_reference before deduplicating.
Statement period vs. actual data range. The statement header shows the requested period, but some SIB branches print only the transactions that exist, so the first and last transaction dates may not match the header dates. Always use transactions[0].date and transactions[at(-1)].date for the actual covered range.
Handle merged rows in branch-printed PDFs. Older branch-printed statements sometimes run long descriptions across two visual lines. Lekha's vision model merges these correctly, but if you're post-processing descriptions yourself, check for unusually short description values that are continuation fragments.
FAQ
Does Lekha support SIB's SmartBanking app export format?Yes. The SmartBanking app (SIB Mirror+) exports PDFs with a slightly different column layout compared to the net banking portal. Lekha's classifier detects the format automatically and applies the correct extraction strategy.
Can I extract data from a scanned SIB branch statement?Yes. Scanned PDFs are processed using the same vision pipeline as digital PDFs. Quality matters: 200 DPI or higher gives reliable results. Documents scanned below 150 DPI or heavily skewed may return lower confidence scores.
How does Lekha handle SIB NRI statements with USD/GBP/AED transactions?Lekha returns the INR equivalent for all amounts (currency: "INR"), matching the settled value in the account. The original foreign currency details appear in the description field of the transaction.
No. Lekha is designed for DPDP compliance — documents are processed in memory and discarded immediately. No statement data is stored or logged. See the privacy docs for details.
South Indian Bank's loyal customer base in Kerala, Tamil Nadu, and the NRI diaspora makes SIB statement parsing a real production need for lenders, CA firms, and fintech apps serving these markets. Lekha handles the format variations, NRI account types, and multi-page edge cases so your code doesn't have to.
Ready to parse your first SIB statement? Sign up at lekhadev.com and run your first extraction for free — no credit card needed. Full API reference at lekhadev.com/docs.