Python 如何使用telebot发送发票?

Python 如何使用telebot发送发票?,python,telegram,payment,Python,Telegram,Payment,所以,我在做电报机器人,我希望它发送发票。 这是我尝试发送发票时使用的代码: bot.send_invoice(chat_id=chat_id, title="Flowers Delivery", description=description_of_package, invoice_payload='some-invoice-payload-for-internal-use', provider_token

所以,我在做电报机器人,我希望它发送发票。 这是我尝试发送发票时使用的代码:

bot.send_invoice(chat_id=chat_id, title="Flowers Delivery", description=description_of_package,
                 invoice_payload='some-invoice-payload-for-internal-use',
                 provider_token=keys.TEST_TRANZZO_PAYMENT, currency="UAH",
                 prices=[{'label': 'flowers', 'amount': 1000}], start_parameter="test-start-parameter")
这就是我犯的错误:

2021-05-26 10:50:27,091 (__init__.py:544 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: there must be at least one price"

如果您使用的是
telebot
库,这表明您需要导入
LabeledPrice

from telebot.types import LabeledPrice

prices = [LabeledPrice(label='Working Time Machine', amount=5750),
    LabeledPrice('Gift wrapping', 500)]