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.requestPayment()

Request that the user creates a payment request to be used by the web app. This will return a UPI URI.

Method


async function requestPayment(args: RequestPaymentArgs): RequestPaymentResponse;

Parameters


interface RequestPaymentArgs {
  amount: string | number;
  payeeVPA?: string; // If web app wants the user to create from a specific UPI ID account.
  transactionNote?: string;
}

Response


interface RequestPaymentResponse {
  upiUri: string;
}

Code Example


await webUPI.enable();
const paymentRequest = await webUPI.requestPayment({
  payeeVPA: 'yourvpa@bank',
  amount: 1000,
  transactionNote: 'Payment for services'
});
PreviouswebUPI.sendPayment()NextwebUPI.getUPIId()

Last updated 1 year ago

đŸ’ģ