Skip to main content
GullySystem
A practical guide

Razorpay Integration for Indian Businesses: UPI, Payment Links, Webhooks and Reconciliation

Ganesh HSStrategy and Technology, GullySystem
Practical advice · 6 min read

In this guide 8 sections
The short answer

Razorpay needs more than a pay button. Your server creates the order, the customer pays by UPI, card or payment link, and only a signed webhook marks the order paid in your system. Settlements are then matched to invoices, with fees and refunds booked separately, so the accountant sees the same figures as the bank statement shows.

Start with the moment of payment. A clinic, a contractor or a caterer bills after the work is done, so payment links sent on WhatsApp or SMS fit better than a checkout page.

An online store or booking app needs checkout inside the app, with the order created on your server first so nobody can change the amount in the browser. A gym or tiffin service charging every month needs subscriptions backed by a mandate, which the customer approves once in their UPI app or card. Amounts travel to Razorpay in paise, the smallest currency unit, so store every amount as an integer and never as a decimal that rounding can quietly corrupt.

Razorpay sells these as separate products, so choose by the moment your customer actually pays rather than by the length of the feature list.

Razorpay payment links can be created from the dashboard or the API, carry an expiry date, and accept UPI, cards and netbanking. Partial payments are optional, and a partially paid invoice should stay open with its balance showing until the rest arrives.

Generate every link from your own billing software so it carries the invoice number, and the webhook can then tell your system exactly which invoice to close. No more Friday phone calls.

That ends the weekly round of ringing eleven customers to ask whether the transfer went through, because a paid invoice closes itself the moment the money arrives. Set each expiry to match your payment terms, so a link for a thirty day invoice does not stay payable long after the order was cancelled.

Treat the Signed Webhook as Proof of Payment

The browser’s success screen proves nothing. Razorpay signs each webhook with a secret you set in the dashboard, and your server must verify that signature before it marks anything paid. Unsigned or spoofed calls get rejected.

UPI payments can take a while to confirm, so give orders a pending state instead of forcing each one into paid or failed too early.

Razorpay’s documentation says webhooks can arrive more than once or out of order, so store the event ID from the x-razorpay-event-id header and deduplicate on it. Nobody gets credited twice. Add a nightly sweeper job that asks Razorpay about every order still pending after a leeway, because a webhook lost in transit would leave a paid customer waiting. Log the raw payload before processing it, because when a dispute arrives months later that stored record is the only evidence of what Razorpay actually sent.

Reconcile Settlements, Fees and Refunds Weekly

Razorpay pays out in settlements after deducting its fees and the GST charged on those fees, and its documentation gives a standard domestic cycle of two working days. Your own account’s cycle may differ. One bank credit covers a whole batch of payments.

Matching by amount alone fails. Compare settlement totals in paise as integers, because converting to rupees first lets rounding hide a difference of a few paise. Pull the settlement data through the API, match each payment ID to its invoice, and then investigate whatever is left over. Run the match every week rather than every quarter, because a missing payment found within days is a phone call and one found months later is a dispute.

Book the gateway fee as an expense, give refunds and disputes entries of their own, and in Tally post the receipt and the fee as separate vouchers. The accountant then agrees with the bank.

Test the Awkward Cases Before Going Live

If you take a handful of online payments a month, a payment link from the Razorpay dashboard may be all you need for a long time.

An integration pays for itself once manual matching starts consuming days of your accountant’s month, and before launch you should test every case in the list below. Each of them will happen.

  • A UPI payment that stays pending, then succeeds
  • A customer on spotty mobile data who closes the app straight after paying
  • Redelivery of the same webhook
  • A partial refund followed by a full refund
  • An invoice edited after its payment link was sent

Put the advice to work.

Use a test copy or fictional example to turn the discussion into something your team can check.

Use Payment Links for Invoices and Collections

Can the same receipt be allocated without counting the money twice?

Take an unallocated amount in “Use Payment Links for Invoices and Collections” and apply it to the intended balance. Review the remaining amount and the original receipt reference together.

Background reading: ERPNext: payment allocation

Razorpay flow and reconciliation sheet

One page shows order creation, payment by checkout or link, webhook verification and the pending, paid, failed and refunded states a payment can sit in. A second sheet matches each settlement line to its invoice, the gateway fee and any refund, laid out so the rows post straight into Tally as vouchers.

Open a blank worksheet to print

Questions owners ask

Do I need a developer to accept payments through Razorpay?

Often you do not. You can create payment links in the dashboard and share them yourself, and a small shop can stop there. A developer becomes necessary when links should come from your own invoices and each payment should close its invoice without anyone typing.

Why does the money in my bank not match my Razorpay payments?

A settlement bundles payments together and deducts fees and the GST on those fees before payout, and refunds can shrink a later settlement. Match by payment ID instead. Amounts alone will mislead you.

Can Razorpay be connected to Tally?

Yes, this is routine integration work. Receipts and gateway fees go into Tally as separate vouchers linked to the invoice, so the ledger and the bank statement agree line by line.

Is a payment link enough for a small shop?

Yes, for a handful of customers. Create the link in the dashboard, send it on WhatsApp with the invoice number in the description, and reconcile against the bank statement once a week. Move to an integration when the matching work starts eating into your accountant’s week, or when links must come from invoices.

Sources

Browse all guidesBack to top ↑
Next step

Have a specific situation to work through?

This article covers the general case. Tell us what you’re actually dealing with and we’ll respond directly.

Discuss Your Requirement