A
A
allias1732019-05-17 10:20:50
Python
allias173, 2019-05-17 10:20:50

How to issue a Send_invoice?

bot = telebot.TeleBot(token)

@bot.message_handler(commands=['pay'])
def pay_answer(message):
  bot.send_invoice(
    chat_id = message.from_user.id,
    title = '1',
    description = '1',
    invoice_payload = 'asdasd',
    provider_token = 'testtoken',
    start_parameter = 'asdasda',
    currency='RUB',
    prices = [LabeledPrice("title", 29000)])

Problem with prices parameter, throws an error
[b'{"ok":false,"error_code":400,"description":"Bad Request: there should be at least one price"}']"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question