1.0.3 • Published 8 months ago

upiqrcode v1.0.3

Weekly downloads
-
License
GPLV3
Repository
github
Last release
8 months ago

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:

FieldsDescriptionRequired
payeeVPAVPA address from UPI payment accountMandatory
payeeNameMerchant Name registered in UPI payment accountMandatory
payeeMerchantCodeMerchant Code from UPI payment accountOptional
transactionIdUnique transaction id for merchant's referenceOptional
transactionRefUnique transaction id for merchant's referenceOptional
transactionNoteNote will appear in payment app while transactionOptional
amountAmountOptional
minimumAmountMinimum amount that has to be transferredOptional
currencyCurrency of amount (default: INR)Optional
transactionRefUrlURL for the orderOptional

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.

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago