Code Monkey home page Code Monkey logo

upiqrcode's Introduction

Upiqrcode

npm package Downloads Issues Semantic Release
Generate NPCI's UPI QR code (BASE64) along with UPI intent link, By using it any payment is possible from UPI enabled apps.

Supports


This package will work on client and server.

  import upiqrcode  from "upiqrcode";

  upiqr({
    payeeVPA: "pratyaymustafi@paytm",
    payeeName: "Pratyay Mustafi"
  })
  .then((upi) => {
    console.log(upi.qr);      // data:image/png;base64,eR0lGODP...
    console.log(upi.intent);  // upi://pay?pa=Pratyaymustafi@paytm&pn=Pratyay..
  })
  .catch(err => {
    console.log(err);
  });

Fields detail:

Fields Description Required
payeeVPA VPA address from UPI payment account Mandatory
payeeName Merchant Name registered in UPI payment account Mandatory
payeeMerchantCode Merchant Code from UPI payment account Optional
transactionId Unique transaction id for merchant's reference Optional
transactionRef Unique transaction id for merchant's reference Optional
transactionNote Note will appear in payment app while transaction Optional
amount Amount Optional
minimumAmount Minimum amount that has to be transferred Optional
currency Currency of amount (default: INR) Optional
transactionRefUrl URL for the order Optional

In table, fields requirement column is based on static QR, For dynamic QR you need to change more fields along with payeeVPA and payeeName.

For a complete list of supported fields, refer to the NPCI UPI Linking Specs

Internally using @types/qrcode for QR Generation.

Refer the blog written by me on how to use this package for additional help.

upiqrcode's People

Contributors

pratyay360 avatar

Stargazers

 avatar  avatar

Forkers

panditsiddharth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.