A
A
Absolutecmd2020-07-15 07:25:53
Python
Absolutecmd, 2020-07-15 07:25:53

Why is the send_invoice command not working?

I'm new to programming, so for the experience I decided to make a small bot.
Main problem when sending send_invoice():
ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned HTTP 400 Bad Request. Response body:
[b'{"ok":false,"error_code":400," description":"Bad Request: CURRENCY_INVALID"}']"
Here is the code itself:

bot.send_invoice(
      chat_id = call.message.chat.id,
      title = MESSAGES['cart_info_title'], 
      description = MESSAGES['cart_info_description'],
      invoice_payload = 'invoice_for_cart_payment',
      provider_token = PAYMENTS_PROVIDER_TOKEN,
      start_parameter = 'cart_payment_example',
      prices = prices,
      currency = 'RUB',
      )

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