The UPI Statement Parser is a Python & Node based tool that helps you organize and parse your bank statements(only ICICI bank at the time of writing). It specifically focuses on extracting valuable information from the "Transaction Remarks" column for transactions done via UPI. This information is then split into three distinct columns: Payee, Cheque Number, and Transaction Remarks
Note: Parsed Transaction Remarks captures notes stored via apps like paytm and gpay for each transaction
- Transaction Remarks Parsing: Extracts crucial information from the "Transaction Remarks" column of ICICI bank statements.
- Data Organization: Splits extracted information into three columns - Payee, Cheque Number, and Transaction Remarks.
- Backend for Payee Name Resolution: Utilizes a Node.js backend to resolve payee names based on their UPI IDs.
Before using the UPI Statement Parser, ensure you have the following prerequisites:
- Python 3.x
- Node.js (for backend)
- PAYU SDK Client Key and Salt for UPI ID resolution (for backend, not required for basic parsing)
- For testing and development purposes, you can use non-commercial keys.
-
Clone the repository:
git clone git@github.com:SurajMeena/upi-transaction-parser.git cd upi-transaction-parser
-
Install Python dependencies:
pip install -r requirements.txt
-
Install Node.js dependencies for the backend:
cd backend npm install
-
Place your ICICI bank statement CSV file in the project directory.
-
Rename the file name in the transaction_parser.py
-
Run the parser script:
python3 transaction_parser.py
-
The parsed data will be saved in a new CSV file, which will include columns for Payee, Cheque Number, and Transaction Remarks.
The backend in Node.js is used to resolve payee names based on their UPI IDs. Follow these steps to set up the backend:
-
Navigate to the
backend
directory:cd backend
-
Rename
.env.sample
to.env
in thebackend
directory and provide following information:PAYU_KEY= PAYU_SALT_V1= PAYU_SALT_V2= MYSQL_HOST= MYSQL_USER= MYSQL_PASSWORD= MYSQL_DATABASE=
-
Start the backend server:
node server.js
Now, your Python application can make requests to the backend for payee name resolution.
Q: Why is the backend implemented in Node.js and not Python?
A: During development, the PAYU SDK for Python wasn't working as expected, so a Node.js SDK was used as an alternative.
Q: Why is MySQL needed?
A: The backend uses MySQL to store the payee name resolution data. This is done to avoid making requests to the PAYU API for every transaction.
Q: What do I use this repo for?
A: I personally use Money Manager Ex(MMEX) to manage my finances. MMEX has a feature to import bank statements, but it doesn't parse the transaction remarks column. This repo can be used to parse the transaction remarks column and then import the CSV file into MMEX.
I hope, You can find usecases for this simple repo in your daily life, whether it is to expand this for all sorts of banks or to use it for your own personal finance management.
Contributions are welcome through forking! If you believe that a change can benefit everyone, please submit a pull request to this repository as well.
This project is licensed under the MIT License - see the LICENSE file for details.