explaingit

iamrobinsharaya/upipay

Analysis updated 2026-05-18

23TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A free, open source Node.js and TypeScript SDK that lets Indian merchants accept UPI payments directly into their bank account, without paying a commission to a payment aggregator.

Mindmap

mindmap
  root((UPIPay))
    What it does
      UPI QR codes
      Payment links
      Webhook verification
      Refunds
    Tech stack
      TypeScript
      Node.js
      PhonePe API
      Paytm API
    Use cases
      Accept UPI payments
      Skip aggregator fees
      Verify payment webhooks
    Audience
      Indian developers
      Startups
      E-commerce sites

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add UPI payment acceptance to an Express, Next.js, Fastify, or NestJS app without paying a commission

USE CASE 2

Generate a UPI QR code or payment link for a checkout page

USE CASE 3

Verify that a payment webhook notification genuinely came from PhonePe or Paytm

USE CASE 4

Issue refunds directly through the PhonePe or Paytm merchant APIs

What is it built with?

TypeScriptNode.jsPhonePe APIPaytm API

How does it compare?

iamrobinsharaya/upipayad3lre/echoaffaan-m/x-algorithm-score
Stars232323
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardmoderate
Complexity3/54/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires free merchant credentials from PhonePe Business or Paytm Business and environment variable setup before first use.

Released under the MIT license, free to use, modify, and redistribute, including for commercial projects.

In plain English

UPIPay is a free, open-source Node.js SDK that lets Indian merchants accept UPI payments directly into their bank accounts without paying commissions to commercial payment aggregators like Razorpay, Cashfree, or PayU. Those platforms sit between the customer and the merchant's bank and take roughly 2% per transaction, which the project notes costs a business with one lakh rupees in monthly sales around 24,000 to 36,000 rupees per year in fees for no added value. The reason this is possible is a 2020 Government of India mandate that set the Merchant Discount Rate on standard bank-to-bank UPI transactions to zero. PhonePe Business and Paytm Business are legally required to offer free merchant APIs under this rule. UPIPay wraps those official APIs into a TypeScript-first SDK with a clean developer interface, so your money flows directly from the customer's bank through the NPCI network to your bank, with no aggregator in the middle. Standard bank-account UPI transfers remain fully free, transactions via prepaid wallets or credit cards linked to UPI may incur small interchange fees in some cases. The SDK provides functions for generating UPI QR codes, building UPI payment URIs and deep links for specific apps (PhonePe, Google Pay, Paytm), creating payments, checking payment status, verifying webhook signatures, and initiating refunds. It works with any JavaScript or TypeScript framework including Express, Next.js, Fastify, NestJS, Vue, and SvelteKit. Setup requires registering for free merchant credentials directly with PhonePe Business or Paytm Business, then installing the npm package and configuring a handful of environment variables. The README includes complete integration examples for Express, Next.js App Router, Fastify, NestJS, and Paytm. The library ships with 120 passing tests and is MIT licensed. A security document is included covering webhook verification and other hardening details.

Copy-paste prompts

Prompt 1
Help me set up UPIPay in my Next.js app to accept UPI payments through PhonePe
Prompt 2
Show me how to generate a UPI QR code with UPIPay for a product checkout page
Prompt 3
Write an Express route that verifies a UPIPay webhook signature before marking an order paid
Prompt 4
Explain the environment variables I need to configure PhonePe Business credentials for UPIPay

Frequently asked questions

What is upipay?

A free, open source Node.js and TypeScript SDK that lets Indian merchants accept UPI payments directly into their bank account, without paying a commission to a payment aggregator.

What language is upipay written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, PhonePe API.

What license does upipay use?

Released under the MIT license, free to use, modify, and redistribute, including for commercial projects.

How hard is upipay to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is upipay for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.