Setu
This package helps you use Setu’s DeepLink APIs.
The following functions are supported—
- Generate UPI payment link
- 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.