Logo APIScript Developer

How to Accept UPI Payments on Your Website

The options, the integration steps and the mistakes to avoid.

By the APIScript Developer team · Published

Illustration of the APIScript Developer team at work

UPI is how most people in India prefer to pay online. Adding it to your website or app can raise conversion and lower payment costs compared with cards. This guide explains the main ways to accept UPI, how the integration works, and how to make sure every payment is confirmed correctly.

Your options

  • Payment gateway checkout — a payment aggregator or gateway shows UPI alongside cards and net banking. Easiest when you need several payment methods.
  • UPI collection API — your system creates UPI payment requests or dynamic QR codes directly and receives the status. Good when UPI is your main method and you want control of the experience. See our UPI Collection API.
  • Payment links — send a link by SMS, WhatsApp or email for invoices and orders taken by phone.
  • Static QR code — simplest of all, but you must match payments to orders manually, so it suits small volumes only.

How UPI checkout works on a website

  1. The customer chooses UPI at checkout.
  2. On mobile, your page opens the customer's UPI app (intent flow). On desktop, it shows a dynamic QR code for that order, or sends a collect request to the customer's UPI ID.
  3. The customer approves the payment in their UPI app with their UPI PIN.
  4. Your server receives the result through a callback (webhook) and also checks it with a status API.
  5. You mark the order as paid only after the payment is confirmed on the server.

Integration checklist

  • Use one unique reference per order and pass it with every payment request.
  • Confirm on the server, never only in the browser: a customer can close the page before the redirect.
  • Handle pending payments — poll the status API for a few minutes before treating a payment as failed.
  • Verify callbacks with the signature or checksum the provider gives you.
  • Make the amount and payee name clear on the QR or payment screen to build trust.
  • Reconcile daily against the provider's settlement report.

Choosing a provider

  • Which UPI flows are supported: intent, QR, collect and payment links?
  • How fast is settlement to your bank account, and what are the charges?
  • Are callbacks reliable, and is there a status API?
  • Is there a sandbox for testing and clear documentation?
  • Do they support refunds through the API?

Related reading

How UPI QR payment collection works explains static and dynamic QR codes in detail, and virtual accounts vs UPI collection covers high-value and B2B collections. If you collect on behalf of other merchants, read about the payment aggregator licence first.

APIScript offers the UPI Payment Collection & QR Code API for developers and UPI collection software if you prefer a ready-made portal.

Frequently asked questions

Do I need a payment gateway to accept UPI?

Not necessarily. A UPI collection API can create payment requests and QR codes directly. A gateway is useful when you also need cards and other methods.

How do I know a UPI payment succeeded?

Use the provider's callback and confirm with its status API on your server before marking the order as paid.

Can I accept UPI on a desktop website?

Yes. Show a dynamic QR code that the customer scans with their phone, or send a collect request to their UPI ID.

Related guides

How UPI QR Payment Collection Works

Static and dynamic QR codes, collect requests and the steps to confirm and reconcile every UPI payment.

Read the guide →

Virtual Accounts vs UPI Collection

Compare the two main ways to collect payments, and when to use each or both together.

Read the guide →

Payment Gateway API Integration Checklist

Order flow, server-side verification, webhooks, idempotency, refunds, reconciliation and security for developers.

Read the guide →

View all guides

NPCI Approved Bharat Connect Bill Payment Software

Get Started Now!

Get Started for Free / Explore White-Label Solutions. We build high-performance websites, custom software, and NPCI-approved payment APIs designed to scale your business seamlessly.
Chat with APIScript Developer on WhatsApp