WebUPI Protocol
  • Namaste
    • â„šī¸Welcome to WebUPI!
    • 🏆Benefits of WebUPI
  • How to
    • 👨‍đŸ’ģGetting Started with WebUPI
    • đŸ’ģWebUPI Reference
      • webUPI.enable()
      • webUPI.sendPayment()
      • webUPI.requestPayment()
      • webUPI.getUPIId()
      • webUPI.getPaymentStatus()
      • Error Handling in WebUPI
  • other
    • 📱WebUPI Providers
    • 📓Helpful references
  • WebUPI Providers
    • For Providers
      • Implementing WebUPI as a UPI Provider
  • WebUPI x Web3 Bridge
    • â„šī¸Introduction
    • 👩‍đŸ’ģGet Started
      • webUPI.sendPaymentToLightning()
      • webUPI.requestLightningInvoice()
    • đŸĻ¸Upgrades
  • More Protocols
    • 📓UPI Withdrawal Protocol Specification (UPIW)
    • 📓Commerce Unified Payment Protocol Specifications (CUPP)
    • 📓Real-Time Money Streaming Protocol (RTMS)
Powered by GitBook
On this page
  1. How to
  2. WebUPI Reference

webUPI.sendPayment()

Request that the user sends a payment for a UPI URI. The application needs to provide a UPI URI.

Method


async function sendPayment(upiUri: string): SendPaymentResponse;

Parameters

upiUri: string // the UPI URI you'd like the user to pay.


interface SendPaymentArgs {
  upiUri: string; // the UPI URI you'd like the user to pay.
  callback_url?: string // Once a user approves or denies a payment, the UPI provider can notify the web app using the provided callback URL.
}

Response


interface SendPaymentResponse {
  transactionId: string;
}

Callback Response

{
  "transactionId": "string",
  "status": "approved/declined"
}

Example


const upiUri = "upi://pay?pa=payeeVPA&pn=Payee Name&mc=0000&tid=TransactionId&tr=TransactionRefId&tn=Transaction Note&am=Transaction Amount&cu=INR";
const result = await window.webUPI.sendPayment(upiUri);

Also Read UPI Linking Specs to create custom upiUri 👇

PreviouswebUPI.enable()NextwebUPI.requestPayment()

Last updated 1 year ago

đŸ’ģ
941KB
UPI.Linking.Specs_ver.1.6.0.pdf
pdf
UPI Linking Specs to create custom upiUri