Happy Independence Day

Jai Hind!

Skip to content
Engineering 5 min read

Automated Reconciliation in Multi-Gateway Setups

Math and strategies for matching T+1 settlements across multiple payment aggregators.

PE

Paisape Engineering

Engineering · 12 August 2026

← Back to all posts
Hero Image

The Anatomy of Multi-PG Settlement

Modern fintech architectures rarely rely on a single Payment Aggregator (PA). To ensure high availability and optimal success rates, traffic is dynamically routed across multiple PAs using an intelligent payment switch. While this redundancy is excellent for transaction success rates—allowing you to route away from a gateway experiencing downtime—it introduces a monumental operational challenge in the back-office: reconciliation.

When your infrastructure processes 100,000 transactions a day distributed across four different gateways, reconciling the payouts becomes a daunting, multi-dimensional data-matching exercise. Payments in India typically follow a T+1 settlement cycle as mandated by the RBI. If a customer pays you at 11:30 PM on Monday, the PA aggregates all of Monday's funds, deducts their Merchant Discount Rate (MDR) and applicable GST, and pushes the remainder to your nodal bank account via NEFT or RTGS by Tuesday evening. However, this perfectly orchestrated financial ballet falls apart quickly when dealing with weekends, bank holidays, late-night cutoffs, and edge cases like delayed captures or partial refunds.

The Three Pillars of Reconciliation

A robust automated reconciliation engine cannot rely on a single source of data. It must operate on three distinct, independently generated datasets, creating a three-way matching triad:

  • Internal Ledger (The Origin): Your own database's record of successful transactions, mapped by an internal unique identifier (Order ID). This is what you believe you have sold.
  • PA Settlement Reports (The Intermediary): The daily CSV files or API payloads from each payment gateway detailing which specific transactions were included in a given payout batch, along with the precise deductions (MDR, GST, refunds, and adjustments).
  • Nodal Bank Statement (The Source of Truth): The actual credit entries in your corporate bank account. This is the real, liquid cash that has hit your ledger, typically identifiable by a Unique Transaction Reference (UTR) number.

Reconciliation is the exact process of tying these three datasets together flawlessly. Every internal successful transaction must match a line item in the PA settlement report, and the sum of those settled transactions (minus all fees and refunds) must perfectly match a single UTR credit line in your bank statement. Even a discrepancy of a single paisa breaks the triad.

Deciphering T+1 and T+0 Mechanics

The Reserve Bank of India (RBI) guidelines stipulate that payment aggregators must settle funds to merchants on a T+1 basis (Transaction Date + 1 working day). But what constitutes a "day" in the digital realm?

Different PAs define different daily cutoff times. Gateway A might consider 12:00 AM to 11:59 PM as a single day. Gateway B might strictly use a T+1 cycle but with a cutoff at 9:00 PM, meaning a transaction at 10:00 PM on Monday officially rolls over to Tuesday's batch, meaning it won't settle until Wednesday. Furthermore, RBI holidays, second and fourth Saturdays, and Sundays traditionally halt NEFT/RTGS settlements. Though the advent of IMPS and automated weekend settlements by some modern PAs adds another layer of timeline complexity, you must still account for the lowest common denominator.

Your automated engine must be uniquely configured with each PA's specific SLA, daily cutoff time, and the national holiday calendar. It must use this data to calculate an "Expected Settlement Date" for every transaction. If a transaction passes its expected settlement window without being explicitly marked as settled in a PA report, the engine must immediately flag it as an "Unsettled Anomaly" for the finance team to investigate.

The Complexities of MDR Math

Perhaps the most critical function of a reconciliation engine is validating the fees deducted by the PA. You cannot blindly trust the settlement report—software bugs and misconfigurations happen on the gateway side too. You must independently calculate the expected MDR.

MDR calculations are highly granular and complex. They depend on the payment method (Credit Card, Debit Card, Netbanking, UPI, Wallets), the card network (Visa, Mastercard, RuPay, Amex), the card tier (Classic, Platinum, Signature, Corporate), and the exact transaction amount. For instance, UPI transactions under ₹2000 often attract zero MDR, while Corporate Credit Cards can range anywhere from 1.5% to 3%.

Let's look at the precise math. Suppose a user makes a ₹5,000 payment via a Premium Visa Credit Card. Your agreed negotiated MDR with the PA for this specific BIN (Bank Identification Number) is 1.8%.

  • Transaction Amount: ₹5,000.00
  • MDR (1.8% of ₹5,000): ₹90.00
  • GST on MDR (18% of ₹90): ₹16.20
  • Total Deductions: ₹106.20
  • Expected Settlement Amount: ₹4,893.80

The engine must execute this floating-point calculation for every single transaction across millions of rows. If the PA's settlement report shows a deduction of ₹110.00 instead of ₹106.20, your system must trigger a "Fee Mismatch" alert. Over millions of transactions, a seemingly minor 1-paisa rounding error or an incorrect bin-routing classification by the PA can lead to massive revenue leakage.

Matching the UTR: The Final Mile

Once the transactions are individually mapped to a PA settlement report and the itemized fees are strictly verified, the final step is bank reconciliation. The PA report will provide a UTR number and a net settlement amount for that entire daily batch. Your engine must systematically parse your bank statement (often fetched via automated APIs like ICICI Connected Banking, Yes Bank APIs, or scheduled SFTP drops) and find a credit entry with that exact UTR and exact amount.

This sounds computationally simple, but in reality, banks frequently truncate or prepend text to UTRs in statement narrations. A UTR provided by the PA as CMS1234567890 might appear in your raw bank statement text as NEFT-CMS1234567890-RAZORPAY-SETTLEMENT. The engine needs intelligent string-matching algorithms—utilizing Levenshtein distance, regex pattern matching, or substring searches—to confidently link the messy statement entry to the clean PA batch.

Handling Edge Cases: Refunds, Chargebacks, and Rolling Reserves

A true production-grade reconciliation system spends 80% of its computational logic handling the remaining 20% of edge cases. Real-world money movement is rarely clean:

  • Late Refunds: A transaction happens on Monday. The customer requests a refund on Wednesday. The PA will not ask you to send them money; instead, they will simply deduct this refund amount from Thursday's incoming settlement batch. The engine must cross-reference refund requests against settlement deductions to ensure you aren't double-charged and that the math still nets out perfectly.
  • Chargebacks and Disputes: When a user disputes a transaction directly with their credit card issuing bank, the PA automatically debits the disputed amount from your next settlement, often applying an additional non-refundable chargeback penalty fee. The engine must isolate these non-transactional deductions and map them to a dedicated risk/dispute ledger, rather than failing the daily transaction math.
  • Rolling Reserves: For high-risk merchants, PAs might hold back 5% to 10% of daily settlements as a security deposit for 90 to 180 days. The engine must track these reserved funds in a separate virtual holding ledger and automatically reconcile them when they are finally released months later in a completely unrelated settlement batch.

By automating these intricate mathematical validations and multi-way matching workflows, engineering teams can transform reconciliation from a chaotic, error-prone monthly spreadsheet nightmare into a precise, real-time financial command center that guarantees every single rupee is accounted for.