Kotak Mahindra Bank statement parser API
Kotak PDFs come in two shapes. One is a text statement where each line carries a signed amount, + for a credit and - for a debit; the other is a table with separate Withdrawal and Deposit columns. The parser picks the shape from page one, where the signed statement prints both TRANSACTION DATE and DEBIT/CREDIT, and returns the same JSON for both.
Formats and columns
- PDF: signed text statement (serial, transaction date, value date, details, signed amount, balance), or the table Sr No, Date, Description, Chq/Ref, Withdrawal, Deposit, Balance.
- Excel: .xls or .xlsx with SL. NO., Transaction Date, Value Date, Description, Ref No, Amount and a Dr / Cr column.
How the API recognises it
PDFs score on KOTAK or the KKBK code, Account Statement, Deposit (Cr.) and DEBIT/CREDIT. The Excel export scores on KOTAK MAHINDRA BANK LIMITED, Cust. Reln. No., Statement Period and the SL. NO., TRANSACTION DATE, AMOUNT and DR / CR headings.
Dates and amounts
Kotak prints dates as DD Mon YYYY, such as 05 Apr 2025. In the table layout a balance ending in Dr, (Dr) or DR. comes out negative, and the printed balance lines may put Rs., INR or ₹ before the figure. In the Excel export, the first Dr / Cr column decides whether each Amount is a debit or a credit, and the one after Balance makes a Dr balance negative.
Account details
Account number, IFSC and the printed period from a PDF; account number and IFSC from Excel, whose period runs from the first to the last row. On the table layout cheque_no is the Chq/Ref cell. On the signed layout the parser pulls the reference out of the narration: UPI, NEFT, IMPS, RTGS, NACH, MMT, TBMS and CMS references.
Opening and closing balances
On a PDF the opening and closing balances are the printed ones, from Opening and Closing Balance lines or from the one-line summary that also gives total debits and credits; on a statement of several pages the closing figure comes from the last page. When they are not printed, they are worked out from the rows. The PDF parser then checks that opening plus the rows equals closing and that debits and credits match the printed totals, and logs a warning in the service log when they do not; the rows are returned as read. Excel balances come from the first and last rows.
What the parser handles
- Narrations that run over several lines are joined; a continuation line that starts with a time of day has the time taken off.
- Repeated ACCOUNT STATEMENT headings, GENERATED ON lines and printed balance lines are not taken as transactions.
- Excel files stop at the Closing balance row.
Sample Kotak Mahindra Bank result
One made-up Kotak Mahindra Bank row, as printed:
1 05 Apr 2025 05 Apr 2025 UPI/DEMO CAFE/UPI-512300000002 -320.00 24,180.00 And its result file:
{
"document_kind": "bank_statement",
"result": {
"meta": {
"account_number": "XXXXXX6620",
"bank_name": "KOTAK MAHINDRA BANK",
"closing_balance": "31680.00",
"detected_currency": "INR",
"ifsc_code": "KKBK0XXXXXX",
"opening_balance": "24500.00",
"parser_name": "kotak-mahindra-bank",
"parser_version": "0.1.0",
"period": {
"end": "2025-04-08",
"start": "2025-04-05"
},
"source": "file_upload"
},
"schema_version": "2.0",
"transactions": [
{
"amount": "-320.00",
"date": "2025-04-05",
"description": "UPI/DEMO CAFE/UPI-512300000002",
"metadata": {
"balance_after": "24180.00",
"cheque_no": "UPI-512300000002"
}
},
{
"amount": "7500.00",
"date": "2025-04-08",
"description": "IMPS-512300000003-SAMPLE CLIENT-FEES",
"metadata": {
"balance_after": "31680.00",
"cheque_no": "IMPS-512300000003"
}
}
]
},
"schema_version": "2.0"
} Protected PDF, .xls and .xlsx files open with the password you send with the job. JSON only: no Excel, CSV or Tally export. Result fields · API docs · Pricing · Console