QiwiPayments

Track payment with Qiwi.com

Getting started

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

Set Api Token to lib:

Libs.QiwiPayment.setQiwiApiToken(API_KEY);

let link = Libs.QiwiPayment.getPaymentLink({
    account: "+7XXXXXXXXXX", // Qiwi wallet
    amount: 250, // amount in RUB
    comment: "u" + String(user.id) // track transaction with label for user or order 
});

User can make payment via this link.

Bot need check payments

Libs.QiwiPayment.acceptPayment({
      account: "+7XXXXXXXXXX", // Qiwi wallet
      onSuccess: "/onacceptpayment",
      onNoPaymentYet: "/onnopaymentyet",
      comment: "u" + user.id // track transaction with label for user or order
})

If payment recived command /onacceptpayment executed.

Params contain amount in RUB:

let amount = parseFloat(params);

Last updated