QiwiPayments
Track payment with Qiwi.com

Getting started

Need Api token from https://qiwi.com/api

Set Api Token to lib:

Libs.QiwiPayment.setQiwiApiTokent(API_KEY);
1
let link = Libs.QiwiPayment.getPaymentLink({
2
account: "+7XXXXXXXXXX", // Qiwi wallet
3
amount: 250, // amount in RUB
4
comment: "u" + String(user.id) // track transaction with label for user or order
5
});
Copied!
User can make payment via this link.

Bot need check payments

1
Libs.QiwiPayment.acceptPayment({
2
account: "+7XXXXXXXXXX", // Qiwi wallet
3
onSuccess: "/onacceptpayment",
4
onNoPaymentYet: "/onnopaymentyet",
5
comment: "u" + user.id // track transaction with label for user or order
6
})
Copied!
If payment recived command /onacceptpayment executed.
Params contain amount in RUB:
let amount = parseFloat(params);