D
D
DTPlayer2021-12-02 20:44:58
Python
DTPlayer, 2021-12-02 20:44:58

How to remove the CURRENCY_INVALID error?

import telebot
from telebot.types import LabeledPrice
provider_token = 'token here'
prices = [LabeledPrice(label='Working Time Machine', amount=5750*100), LabeledPrice('Gift wrapping', 500*100)]
bot.send_invoice(message.chat.id, title='Working Time Machine',
                     description='Want to visit your great-great-great-grandparents?'
                                 ' Make a fortune at the races?'
                                 ' Shake hands with Hammurabi and take a stroll in the Hanging Gardens?'
                                 ' Order our Working Time Machine today!',
                     provider_token=provider_token,
                     currency='RUB',
                     photo_url='http://erkelzaar.tsudao.com/models/perrotta/TIME_MACHINE.jpg',
                     photo_height=512,  # !=0/None or picture won't be shown
                     photo_width=512,
                     photo_size=512,
                     is_flexible=False,  # True If you need to set up Shipping Fee
                     prices=prices,
                     start_parameter='time-machine-example',
                     invoice_payload='HAPPY FRIDAYS COUPON')

But when I try to send such a message, I get:
"A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: CURRENCY_INVALID"
. How can this be corrected?

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