Skip to content
Home / Blog / Engineering & Growth

Payment Gateway Integration in India: A Practical Guide

Payment gateway integration in India explained: UPI, cards, wallets, webhooks, reconciliation and refunds, with a checklist to avoid costly mistakes.

Payment gateway integration in India looks easy in the demo: add an SDK, show a checkout, get money. In production it is mostly about the unhappy paths. The user pays but the app crashes. A UPI collect request times out. A refund is promised and nobody knows when it lands.

This guide explains the moving parts in plain words: payment methods, the order and payment lifecycle, webhooks, reconciliation and refunds. It is written for founders and product owners who need to review a developer's plan, and for developers who want a checklist.

It is general technical information. Gateway fees, limits and RBI rules change, so check each provider's current documentation and take professional advice on compliance.

Which payment methods do Indian customers actually use?

India's payment mix is different from most markets. UPI is the default for many everyday purchases because it is instant and has no card to carry. Debit and credit cards, net banking and wallets still matter, and some buyers want EMI or pay-later options for higher-value items.

The right mix depends on your audience. A consumer app for small-ticket purchases should make UPI intent (opening the user's UPI app directly) the first option. A B2B SaaS selling annual plans will see more cards, net banking and bank transfers. Overseas customers need international cards, which usually have to be enabled separately on your gateway account.

  • Small consumer purchases: UPI first, then cards and wallets.
  • B2B subscriptions: cards, net banking, and invoice-based bank transfer.
  • Global customers: international cards, with currency and settlement rules confirmed with the provider.
  • High-value orders: consider EMI, and say clearly who bears any extra cost.

How should you choose a payment gateway?

Do not choose on headline fee alone. Ask how the gateway behaves when things go wrong. Look at how quickly settlements reach your bank account, how failed payments are reported, how good the dashboard and exports are, and whether support answers technical questions.

Also check what you need on day one: recurring payments for subscriptions, payment links for sales teams, split payments for marketplaces, and GST-friendly reports. Fees and policies change, so check current pricing and onboarding requirements. Account approval needs business documents, a website or app that meets the provider's rules, and sometimes a few days of back-and-forth, so start early.

Questions to ask before signing up

Ask which payment methods are enabled by default, what the settlement schedule is, how disputes and chargebacks are handled, what the sandbox looks like, and whether the provider offers webhooks with retries and signature verification. A weak sandbox slows your developers for weeks.

What does a safe payment flow look like?

The safest pattern is order first, payment second. Your server creates an order with a unique ID and the amount, stored as an integer in paise. The gateway returns its own order reference. The app opens checkout using that reference. After payment, the gateway sends a webhook to your server, and only then do you mark the order as paid.

Never trust the success screen on the phone. A user can lose network after paying, or the app can be killed. If your server waits for the webhook, the order still completes. Never calculate the amount in the app either, because a modified client can change it. Always compute it on the server.

  1. Create the order on your server with amount in paise and a unique internal ID.
  2. Pass the gateway order reference to the client SDK.
  3. Receive the webhook, verify its signature, then mark the order paid.
  4. Let the app poll your server for status so the user sees the result.
  5. Make every step idempotent: the same event processed twice changes nothing.

Why do webhooks cause so many bugs?

Webhooks can arrive late, twice, or out of order. A "captured" event might arrive before "authorised" in a retry storm. Design for that. Store each event ID you process, ignore duplicates, and make state changes follow rules, for example an order can move from pending to paid but never from refunded back to paid.

Return a success response quickly and do heavy work in a background job. If your endpoint is slow or errors, the gateway will retry, and you may process the same payment several times. Log the raw payload for every event so support can answer "what happened to my payment?" in minutes.

Keep a fallback too. A scheduled job that asks the gateway for the status of any order stuck in pending for more than a few minutes rescues payments whose webhook never arrived.

A worked example: the double-tap on Pay

Consider a hypothetical booking app. A customer taps Pay, sees a spinner for ten seconds on a weak connection, and taps again. Without safeguards, two orders are created and the customer may be charged twice.

With a good design, the first tap creates an order tied to the booking ID. The second tap finds that open order and reuses it instead of creating another. If both payments somehow succeed, the reconciliation job spots two captures against one booking and flags one for refund. The customer sees one confirmation and, at worst, a refund within the gateway's stated timeline.

This is the kind of flow we think through for booking and wallet products, such as the multi-service booking in the salon booking app space, where one cart can cover several services and salons.

How do reconciliation and refunds work?

Reconciliation means matching three records: your orders, the gateway's transactions and the settlements in your bank account. Do it daily, automatically. Differences usually come from failed webhooks, fees and taxes deducted before settlement, refunds in flight, or disputes. Finance teams need a report they can trust for GST and accounting, so keep the gateway's transaction ID on every order.

For refunds, decide the rules before launch. Full or partial, to the original method or to an in-app wallet, who approves, and how long users should wait. Show the status in the app so support is not flooded with "where is my money" messages. If you issue wallet credit, the ledger must be exact; see our notes on a wallet and coins system for the pitfalls.

What should you test before going live?

Run every case in the gateway's sandbox, then do a small real-money test in production. Test with the real mobile build, not only a browser, because UPI app switching behaves differently across Android versions and devices.

Security basics apply too. Keep API secrets on the server, never in the app. Verify webhook signatures. Do not store card numbers; let the gateway's hosted fields handle them. Our app security checklist covers the wider picture, and the way you expose payment endpoints should follow good API design practices.

  • Success, failure, user cancelled, and pending-then-success cases.
  • Network drop after paying, and app killed mid-payment.
  • Duplicate and delayed webhooks.
  • Partial and full refunds, plus refund failure.
  • Amount tampering attempts, and expired orders.
  • Daily reconciliation report matches the bank settlement.

Conclusion: plan the unhappy paths first

Good payment gateway integration in India is less about the SDK and more about state, retries and records. Decide your payment mix, make the webhook your source of truth, reconcile daily and write down your refund rules before the first rupee moves.

If you are planning an app or SaaS with payments, share your scope through the free project brief builder. Elevenmonk can then review the payment flows with you and give an indicative estimate based on your real requirements.

Frequently asked questions

Can I accept UPI payments without a payment gateway?

You can show your UPI ID or QR code and collect payments manually, but that does not give you automatic order matching, refunds or reports. For an app or website, a gateway or a payment aggregator lets you confirm each payment by webhook. Check current rules and options with your provider and a financial adviser.

How long does payment gateway integration take?

As an indicative range, a basic checkout with UPI and cards can take days of development once your merchant account is approved. Subscriptions, marketplace splits, refunds and reconciliation add more. Account approval time is outside your developer's control, so apply early.

What is the difference between a payment gateway and an aggregator?

A gateway securely passes payment details between your app, the customer's bank and your acquirer. An aggregator holds the merchant account on your behalf and settles funds to you, so onboarding is usually faster. Many Indian providers offer both functions in one product. Compare features and terms before you pick.

Do I need to store card details myself?

No, and you should avoid it. Use the gateway's hosted checkout or SDK fields so card data never touches your servers. This lowers your security burden. Store only the gateway's transaction reference, the amount, status and timestamps. For compliance questions, consult a qualified professional.

/ Talk to Elevenmonk

Want help with this? Let’s talk.

Tell us what you are planning. A founder or senior engineer replies with honest next steps, from Mumbai, for clients across India and worldwide.

Prefer to share your idea in writing? Use the free project brief builder: answer a few questions and send the brief on WhatsApp in one tap.

WhatsApp us