Home>

Good evening, today adding a payment to my Telegram bot ran into such a problem that the payment request is not sent.

Request:

elif call.data== 'buyplus':
        bot.send_invoice(
            chat_id=call.from_user.id,
            title="*mytitle*",
            description="*my desc*",
            invoice_payload="*my payload*",
            provider_token="*myYooToken*",
            currency="RUB",
            start_parameter="bot",
            prices=[{
            "label":"Rub",
            "amount":15000
            }]
        )

Error:

2022-01-17 21:57:11,178 (__init__.py:694 MainThread) ERROR -TeleBot: "A request to the
Telegram API was unsuccessful. Error code: 400
least one price"

Can you translate the text of the error?

Clark Devlin2022-01-20 23:51:13

In fact of the matter is that everything is done according to the documentation. Rechecked several times. I can't figure out why this error is thrown.

Beirym2022-01-20 23:51:13