Bilpay SDK is the only library you need to start receiving online payments.
- Import the library
- Enter merchant key
- Receive payment
npm install bilpay-sdk@1.0.2 --save
All you need to do is to configure a Bilpay object and create transaction from it.
const bilpay = new Bilpay({
shopName: "BilPay DEMO Shop",
pubKey: "GC5BU5L3XQ4KF5U27AB266UV2QLVEZYB2R2IE72KWO6STRKZDMWZ4AW2",
timeOut: 50000,
});
let amount = 5;
let information = "Bilpay is easy way to pay!"
bilpay.createTransaction(amount, information)
.then((transaction) => {
transaction.onPayment({
success: () => {
console.log("YAYYYY")
}, fail: () => {
console.log("Payment Time out")
}
});
});
Transaction object has an onPayment method that you can set success and failure callbacks
All css are handled in house and in line. More importantly, you do not need to wory about our css desecrating yours.