Answered by
reo7sp
Sep 14, 2026
Replies: 1 comment
|
auto price = std::make_shared<TgBot::LabeledPrice>();
price->label = "Item Price";
price->amount = 1000; // 10.00 RUB: сумма указывается в копейках
TgBot::SendInvoiceArgs invoice;
invoice.chatId = query->message->chat->id;
invoice.title = "Product Title";
invoice.description = "Product Description";
invoice.payload = "Payload";
invoice.providerToken = "PROVIDER_TOKEN";
invoice.currency = "RUB";
invoice.prices = {price};
bot.getApi().sendInvoice(invoice);Для Telegram Stars используйте |
0 replies
Answer selected by
reo7sp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

LabeledPrice— обычная структура без конструктора с двумя аргументами, поэтомуmake_shared<LabeledPrice>("Item Price", 1000)не скомпилируется. Заполните поля явно:Для Telegram Stars используйте
currency = "XTR", пустойproviderTokenи…