← Back to Projects
March 20, 20241 min read

Payment Reconciliation & Reporting System

Python-based reconciliation system matching payment gateway transactions with internal order records, processing large CSV datasets with automated mismatch reporting.

PythonPandasPostgreSQLCron

Payment Reconciliation & Reporting System

An automated reconciliation system that matches payment gateway transactions with internal order records, ensuring 99.9% financial accuracy.

Problem

With thousands of daily transactions across multiple payment gateways (Razorpay, Cashfree), manual reconciliation was:

  • Taking 4-5 hours daily
  • Achieving only ~98% accuracy
  • Not scalable with growing transaction volumes

Solution

Built a Python-based pipeline using Pandas for data processing:

Core Features

  • Multi-gateway support: Processes data from Razorpay, Cashfree, and ICCL
  • Fuzzy matching: Handles slight variations in transaction references
  • Amount tolerance: Configurable tolerance for rounding differences
  • Automated reporting: Generates detailed mismatch reports with categorized discrepancies

Data Pipeline

  1. Fetch gateway settlement files (CSV/API)
  2. Load internal order data from PostgreSQL
  3. Run matching algorithms with configurable rules
  4. Generate categorized reports (matched, unmatched, amount mismatches)
  5. Email reports to finance team
  6. Log metrics for monitoring

Results

  • 99.9% financial accuracy maintained consistently
  • 80% reduction in manual effort
  • Daily automated runs via cron jobs
  • Finance team focuses on exception handling only