Skip to content
Sign in

HDFC Bank statement parser API

HDFC Bank's net-banking PDF prints its transactions without ruling lines, so there is no table to lift. The parser finds the Date, Narration and Chq./Ref.No. headings on the first three pages, then places every word by where it sits on the page. Text that is normally spaced and text where the words run together are both read.

Formats and columns

How the API recognises it

A PDF scores on the HDFC BANK name, the headings Narration, Withdrawal, Deposit and Closing Balance, and phrases such as Statement of accounts and Chq./Ref.No. An Excel or CSV download scores on HDFC BANK LIMITED with labels like CUSTOMER'S COPY, Account Branch and Account No :. If no page of the first three carries the Date, Narration and Chq/Ref headings, the PDF is not read as HDFC.

Dates and amounts

PDF rows start with a two-digit-year date such as 03/04/25, while the period comes from the From : 01/04/2025 To : 30/04/2025 line. Figures carry commas and two decimals, with withdrawals and deposits in their own columns. The CSV and Excel parsers also take DD/MM/YYYY, DD-Mon-YY and real spreadsheet dates.

Account details

From a PDF: the account number after Account No, the IFSC after IFSC : and the printed period. The CSV and Excel parsers do not look for the IFSC, so ifsc_code is empty there; they put the Chq./Ref.No. value on each row as cheque_no. The PDF leaves the reference and value-date text out, so its rows carry only the running balance.

Opening and closing balances

On a PDF the opening and closing balances are taken from the statement summary, searched from the last page backwards. Both the six-figure summary (opening, debit count, credit count, debits, credits, closing) and the four-figure one are read; with no summary they are 0.00. For CSV and Excel, the period and both balances come from the first and last rows, which assumes the export runs oldest first.

What the parser handles

Sample HDFC Bank result

One made-up HDFC Bank row, as printed:

03/04/25  UPI-SAMPLE STORES-PAYMENT    0000512345678  03/04/25  1,250.00            41,060.55

And its result file:

{
  "document_kind": "bank_statement",
  "result": {
    "meta": {
      "account_number": "XXXXXXXXXX4821",
      "bank_name": "HDFC BANK",
      "closing_balance": "54060.55",
      "detected_currency": "INR",
      "ifsc_code": "HDFC0XXXXXX",
      "opening_balance": "42310.55",
      "parser_name": "hdfc-bank",
      "parser_version": "0.1.0",
      "period": {
        "end": "2025-04-09",
        "start": "2025-04-03"
      },
      "source": "file_upload"
    },
    "schema_version": "2.0",
    "transactions": [
      {
        "amount": "-1250.00",
        "date": "2025-04-03",
        "description": "UPI-SAMPLE STORES-PAYMENT",
        "metadata": {
          "balance_after": "41060.55"
        }
      },
      {
        "amount": "18000.00",
        "date": "2025-04-05",
        "description": "NEFT CR-DEMO TRADERS-INVOICE 42",
        "metadata": {
          "balance_after": "59060.55"
        }
      },
      {
        "amount": "-5000.00",
        "date": "2025-04-09",
        "description": "ATW-CASH WITHDRAWAL-SAMPLE ATM",
        "metadata": {
          "balance_after": "54060.55"
        }
      }
    ]
  },
  "schema_version": "2.0"
}

Protected PDF, .xls and .xlsx files open with the password you send with the job. See which password HDFC uses. JSON only: no Excel, CSV or Tally export. Result fields · API docs · Pricing · Console