Tr?id=1076949064639753&ev=PageView&noscript=1
$56M+ Revenue Generated for Clients 450+ Happy Clients 30+ Team Members AI Powered Services
Article · AI Automation & Development

Payment Reconciliation Automation for D2C Finance Teams: How to Automate Gateway Settlements

Match every Shopify order, gateway payment, COD remittance and bank credit automatically, and review only the exceptions

Raghav Mittal
Contributor Raghav Mittal Oct 8, 2026 · 7 min read
Illustration of connected automation workflows and analytics dashboards

In short

  • Reconciliation for a D2C brand is a three-way match: the Shopify order, the gateway or courier record, and the bank credit identified by its UTR.
  • Indian gateways settle in batches, with Razorpay's standard domestic cycle at T+2 working days and Cashfree and PayU documenting T+1 or T+2 depending on setup, so timing gaps are normal.
  • A clearing ledger for amounts captured but not yet settled keeps month-end books accurate.
  • Fees, GST on fees, refunds, chargebacks and COD deductions must be separated from sales, not netted off silently.
  • Automation should match the routine bulk of lines and push a short exceptions list to a person every day.

Payment reconciliation automation matches every Shopify order to its gateway payment or COD remittance, and every settlement to the bank credit that paid it out, without anyone ticking lines in a spreadsheet. The system handles the routine matches and hands your finance team a short daily list of exceptions such as missing settlements, unexpected deductions or refunds without orders.

This guide shows how to structure the matching, which data to pull from each source and how to post clean entries into your accounts.

  • Reconcile three ways: order, gateway or courier, and bank.
  • Expect settlement delays and use a clearing ledger for money in transit.
  • Book fees, GST on fees, refunds and chargebacks separately.
  • Review exceptions daily rather than everything monthly.

Why D2C reconciliation is harder than it looks

A single day's sales on a Shopify store can land in your bank account in many pieces. Card and UPI payments settle from the gateway in batches, net of fees and refunds. COD money arrives from couriers days later, net of their charges. Marketplaces pay on their own cycles. Meanwhile, some orders are cancelled, some are refunded after delivery and some payments are disputed.

If you only compare total sales in Shopify with total credits in the bank, the difference is never zero and nobody can explain it. Automation fixes this by working at the transaction level.

Know your settlement timelines

SourceStandard cycle (as documented)Reference
RazorpayT+2 working days for domestic payments; instant settlements available on requestRazorpay docs
Cashfree PaymentsT+1 or T+2 business days depending on configured cycle; instant settlement optionsCashfree docs
PayUT+2 working days, excluding bank holidays, subject to account setupPayU
Courier or aggregator CODVaries by contract; some aggregators offer early COD remittanceYour shipping agreement

T is the transaction or capture date, and weekends and bank holidays push settlements later. Your matching logic must allow for this window rather than treating every late settlement as an error.

The data you need from each source

Shopify

  • Order ID, order name, created date, total, payment method and financial status.
  • Transactions on each order, including the gateway's payment ID.
  • Refunds with amounts and dates.

Payment gateways

  • Settlement ID and UTR, settlement date and net amount.
  • Line items in each settlement: payments, refunds, chargebacks and adjustments.
  • Fees and tax on fees for each line. PayU, for example, offers settlement reconciliation and settlement detail APIs for this (PayU API reference), and Razorpay and Cashfree provide settlement reports and APIs in their dashboards.

Couriers and aggregators

  • Remittance ID, date, amount and UTR.
  • AWBs covered, COD amount per AWB and deductions.

Bank

  • Statement lines with UTR or reference, date and amount, via bank statement import or a banking API.

Step-by-step: the matching engine

  1. Order to payment. Match each Shopify transaction to a gateway payment using the payment ID. Flag orders marked paid with no gateway payment, and gateway payments with no order.
  2. Payment to settlement. Confirm each captured payment appears in a settlement within the expected window. Flag payments older than the window that are still unsettled.
  3. Settlement arithmetic. Check that gross payments minus refunds, chargebacks, fees and tax on fees equals the net settlement amount.
  4. Settlement to bank. Match each settlement UTR and amount to a bank credit. Flag settlements not received and bank credits with no settlement.
  5. COD track. Match delivered COD orders to courier remittances by AWB, then remittances to bank credits.
  6. Exceptions report. Send a daily list with the reason for each mismatch, the amount and a link to the order.

Posting entries into your accounts

Once matched, post summarised, verified entries rather than raw data. A common structure uses a clearing ledger for each gateway:

  • When sales are recorded: debit "Razorpay clearing" and credit sales and output GST.
  • When the settlement lands: debit bank for the net amount, debit gateway fees and input GST on fees, and credit "Razorpay clearing" for the gross amount.
  • Refunds and chargebacks: credit notes against sales, with the deduction flowing through the clearing ledger.

At month end, the clearing ledger balance should equal payments captured but not yet settled, which you can verify against the gateway's unsettled report. Agree the exact ledger structure and GST treatment with your CA. If you use Tally, our guide on Shopify Tally integration in this series explains how these entries are posted automatically.

Worked example

Take a hypothetical Monday with 400 prepaid orders worth ₹6,00,000 through one gateway. On Wednesday, a settlement of ₹5,78,560 arrives with this breakdown:

LineAmount (₹)
Payments captured Monday6,00,000
Less refunds processed-6,000
Less gateway fees (2% on payments, for illustration)-12,000
Less GST on fees at 18%-2,160
Less one chargeback-1,280
Net settlement5,78,560

If the bank shows ₹5,78,560 under that UTR, everything reconciles. If it shows a different figure, the engine points straight to the line that differs, whether that is an unexpected fee rate or a refund you did not know about. Your actual fee rates depend on your gateway agreement and payment method mix.

Common exceptions and what they usually mean

ExceptionLikely cause
Order paid, no gateway paymentTest order, manual payment or wrong gateway mapping
Gateway payment, no orderCheckout timed out after payment; the order may need to be created or refunded
Payment unsettled beyond windowHeld for review, bank holiday or account issue
Fee higher than expectedInternational card, specific payment method or pricing change
Delivered COD order not remittedCourier delay or disputed delivery

The "payment captured, no order" case deserves special attention because it means a customer has paid and may not receive anything. Route these to support the same day.

Month-end cut-off, refunds and chargebacks

Three situations cause most month-end confusion, so give each a rule your automation follows every time.

Payments captured on the last days of the month

With T+1 or T+2 settlement, sales captured on the 30th or 31st often settle in the next month. They belong in the month of the sale. The clearing ledger holds them until the settlement arrives, and your month-end report should list them by payment ID so the balance is fully explained.

Refunds that cross months

A refund issued in October for a September order is recorded as a credit note in October, and the deduction appears in an October settlement. The engine should link the refund to the original order so reports can show both the sale month and the refund month.

Chargebacks and disputes

Gateways may deduct a disputed amount from a settlement before the dispute is resolved, and add it back if you win. Track each dispute with its own status: open, won or lost. Book the deduction to a "disputed payments" ledger until the outcome is known, rather than reversing the sale immediately.

Marketplace payouts

If you also sell on marketplaces, their payout reports include commissions, shipping fees, TCS and TDS. Treat each marketplace as another source with its own clearing ledger and matching rules, rather than mixing its payouts into your website reconciliation.

Tools and build options

  • Spreadsheets with scripts: fine for low volumes and one gateway, but fragile as you grow.
  • Dedicated reconciliation software: faster to start, but check support for your specific gateways, couriers and accounting system.
  • Custom middleware: pulls from Shopify, gateway and courier APIs, matches in a database and posts to Tally or Zoho Books. Best when you have several gateways, heavy COD or marketplace sales.

Whichever route you choose, reconciliation sits inside a wider automation stack. Our overview of the Shopify automation stack for 2026 shows how it connects to orders, shipping and reporting.

Automate reconciliation and close faster

When reconciliation runs daily and flags only real exceptions, month-end close becomes a review rather than a rescue mission. TNM builds reconciliation pipelines that connect Shopify, Indian gateways, courier remittances, your bank and your accounting software. See our accounting software automation service to map out your current process.

Frequently asked questions

Bank reconciliation checks that your books agree with your bank statement. Payment reconciliation goes one level deeper for ecommerce: it checks that each order's payment was captured, included in a gateway settlement, reduced only by the expected fees and refunds, and received in the bank. You need both, but payment reconciliation catches missing money that bank reconciliation alone would miss.

Daily is ideal once it is automated, because settlements arrive every working day and problems are easier to fix while they are fresh. Weekly works for smaller brands. Monthly-only reconciliation tends to produce a large backlog of unexplained differences that nobody can trace, especially around refunds and chargebacks that cross month boundaries.

COD money comes from your courier or shipping aggregator, not your gateway. Each remittance should come with a list of AWB numbers and deductions. Match AWBs to Shopify orders marked delivered, check that the amount equals the COD value collected minus agreed charges, and flag delivered orders that have not been remitted after the agreed cycle.

Tally, Zoho Books and similar tools can import bank statements and record receipts, but they do not natively understand Shopify orders or gateway settlement files. You usually need a middleware or script that pulls data from Shopify, gateways and couriers, performs the matching, and then posts summarised, verified entries into the accounting system.

Want this applied to your store?

Get a free audit of your biggest conversion and SEO leaks, or size the upside with our CRO calculator first.