
Every checkout in India eventually needs UPI. upi-pay-kit makes adding it a five-minute job instead of a whole integration project.
Core Overview
upi-pay-kit is an installable browser package that drops a full UPI payment flow into any React, Next.js, or plain JavaScript app, complete with a themeable modal and a ready-to-use React button component.
- createUPIPaymentGateway() for a fully configurable payment modal
- UPIPaymentButton React component with light/dark themes and multiple sizes
- Imperative ref control: open, close, update, destroy, isOpen
- onSuccess, onFailure, and onClose callbacks for full transaction handling
- Configurable payment timeout and success-rate simulation for testing




Usage
npm install upi-pay-kit
Works as a plain JS gateway or a drop-in React component, and only needs to be initialized client-side since it relies on window and document.