Bank Statement Converter API

Convert PDF bank statements into structured JSON from your own application. The API is a single REST endpoint that accepts a PDF and returns extracted transactions.

Endpoint

POST https://ledgerflow.in/api/v1/convert

Send a multipart/form-data request with the following fields:

  • file — the PDF bank statement (required, max 10 MB).
  • password — password for protected PDFs (optional).

Example request (cURL)

curl -X POST https://ledgerflow.in/api/v1/convert \
  -F "file=@statement.pdf" \
  -F "password=optional-pdf-password"

Example request (JavaScript)

const form = new FormData();
form.append("file", pdfFile); // a File or Blob
// form.append("password", "your-pdf-password"); // if protected

const res = await fetch("https://ledgerflow.in/api/v1/convert", {
  method: "POST",
  body: form,
});

if (res.status === 401) {
  // PASSWORD_REQUIRED — prompt the user and resend with "password"
}

const data = await res.json();
console.log(data.transactions);

Example response

{
  "bankName": "HDFC",
  "pageCount": 3,
  "duplicateCount": 1,
  "transactions": [
    {
      "id": "txn-0",
      "date": "01/04/2026",
      "description": "UPI/Payment to Vendor",
      "referenceNumber": "UPI123456789",
      "debit": 2500.00,
      "credit": null,
      "balance": 48250.75,
      "isDuplicate": false
    }
  ]
}

Status & error codes

StatusMeaning
400Missing or invalid file, or file larger than 10 MB.
401PASSWORD_REQUIRED — the PDF is encrypted. Resend with a password field.
403PASSWORD_INCORRECT — the supplied password was wrong.
422NO_TEXT — no extractable text (likely a scanned PDF).
500Unexpected server error while processing.

Notes

  • CORS is enabled, so the API can be called from browser apps.
  • Files are processed in memory and never stored.
  • Currently text-based PDFs are supported; scanned PDFs (OCR) are coming soon.

Need higher volume or an API key?

For production usage, rate limits, or dedicated support, get in touch at support@metrivance.com.