Menu

Build a UPI Transaction Reconciliation Tool in 52 Lines of Python
📰
0

Build a UPI Transaction Reconciliation Tool in 52 Lines of Python

DEV Community·Archit Mittal·about 1 month ago
#TqPlyoSA
#how#python#automation#tutorial#date#amount
Reading 0:00
15s threshold

I track every UPI transaction across PhonePe, Google Pay, and Paytm. Three apps, three different CSV exports, and a tax season that looks like a hostage negotiation. Last weekend I got tired of opening three spreadsheets side by side and built one Python script to merge, deduplicate, and categorize every UPI transaction into a single reconciled Excel file. The whole thing is 52 lines. Here's what it does: Reads CSV exports from any of the three UPI apps Normalizes the wildly different column names each app uses Detects duplicates (the same payment showing up in two apps) Categorizes transactions by merchant keywords (food, fuel, rent, bills, shopping) Exports a clean Excel file with a transactions sheet and a monthly category pivot in ₹ The Code import pandas as pd from pathlib import Path from datetime import datetime SCHEMA = { " phonepe " : { " date " : " Transaction Date " , " amount " : " Amount (INR) " , " party " : " Merchant " , " ref " : " UTR " }, " gpay " : { " date " : " Date " , " amount " : "…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More