Taking money online looks simple: a button, a popup, a success page. The simple look hides a chain of checks, and skipping one of them is how shops end up shipping goods for payments that never arrived. This guide explains the flow so you can set it up properly or judge whether your developer did.
What to prepare
- A bank account in the name of your business or proprietorship.
- PAN, address proof and, for companies, registration documents. Gateways run a KYC check before going live.
- A website with clear prices, a privacy policy, terms and a refund policy. Gateways review these.
- Your contact details and a working support channel.
How a safe payment works
- The customer clicks pay. Your server creates an order with the gateway for a specific amount.
- The gateway shows its own secure page or popup, where the customer pays by UPI, card, net banking or wallet.
- The gateway sends the result back to your website in two ways: through the customer's browser, and through a separate server-to-server message called a webhook.
- Your server checks the signature on that message and checks that the amount and order match. Only then is the order marked paid.
The key is the third and fourth steps. The browser can be tricked or closed halfway. The webhook is the gateway telling your server directly. A site that marks an order paid just because the customer landed on a success page can be fooled by anyone who types that address.
Choosing a gateway
Razorpay, Cashfree, PayU, PhonePe and others are all established. Compare rather than assume: fees per method, settlement time, onboarding speed for your kind of business, quality of the dashboard and support. Many businesses connect two, so that one is a backup.
UPI: very popular, handle with care
Most Indian customers prefer UPI. You can accept it through a gateway (automatic confirmation) or by showing your own QR code (manual matching). The second is cheap but needs somebody to match each transaction ID before releasing the order, and it is where mistakes and fraud happen. For anything beyond a few orders a day, use automatic confirmation.
Good practice checklist
- Verify amount, order and signature on the server, every time.
- Make the webhook safe to receive twice; gateways resend.
- Handle failed and pending payments with clear messages and a retry option.
- Keep payment logs for support and accounting.
- Support refunds from the dashboard or API.
- Test with small real payments before you announce the launch.
Common problems
Money deducted but the order shows unpaid: usually a missing or blocked webhook. Cart total differs from gateway total: rounding or coupon logic done in two places. Test mode left on after launch: surprisingly common. Check these first.
What a test plan should include
- Successful payment by UPI, card and net banking.
- Failed payment, then retry.
- Payment closed halfway, then completed later.
- Same order paid twice by accident.
- Refund of a full and a partial amount.
- Webhook arriving before the customer is redirected, and after.
If you can run through these on a test account and the order status is correct each time, your integration is in good shape. If any of them leaves an order in the wrong state, fix it before real customers find it.
If you want this done for your site, see our payment gateway integration service, and read how a small business can start taking payments if you are still choosing how to register.
