/node-upi-deep-links

Node package to connect to Setu's UPI Deep Link APIs

Primary LanguageJavaScriptMIT LicenseMIT

Setu

This package helps you use Setu’s DeepLink APIs.

version

The following functions are supported—

  1. Generate UPI payment link
  2. Check status of UPI payment link

Installation

npm install @setu/upi-deep-links

(OR)

yarn add @setu/upi-deep-links

Configuration

const SetuUPIDeepLink = require("@setu/upi-deep-links")

let setu = new SetuUPIDeepLink({
    schemeId: "YOUR SCHEME ID",
    jwtSecret: "YOUR JWT SECRET",
    setuProductInstanceId: "YOUR PRODUCT INSTANCE ID",
    setuProductInstanceId: "PRODUCTION | SANDBOX"
});

Usage

Generate UPI payment link

let paymentLinkBody = {
    amountValue: Number,
    billerBillID: String,
    amountExactness: String,
    dueDate: String, // Optional
    payeeName: String, // Optional
    expiryDate: String, // Optional
    settlement: Object, // Optional
    validationRules: Object // Optional
};

let data = await setu.createPaymentLink(paymentLinkBody);

Check status of UPI payment link

let data = await setu.checkPaymentStatus("platformBillID");

License

MIT. Have at it.