-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CreateInvoiceLink query: [400] Bad Request: STARS_INVOICE_INVALID #1410
Comments
what if you try to use a different payload? something like "1234"? Basically that error is the server saying that something in the message message is wrong |
Same issue, with different library. Doesn't work with any payload that I try to set. Guess something is wrong on the telegram level |
XTR price must one item |
Providing a single item to prices fixed the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException: Error executing org.telegram.telegrambots.meta.api.methods.invoices.CreateInvoiceLink query: [400] Bad Request: STARS_INVOICE_INVALID
at org.telegram.telegrambots.meta.api.methods.botapimethods.PartialBotApiMethod.deserializeResponseInternal(PartialBotApiMethod.java:61)
at org.telegram.telegrambots.meta.api.methods.botapimethods.PartialBotApiMethod.deserializeResponse(PartialBotApiMethod.java:41)
at org.telegram.telegrambots.meta.api.methods.invoices.CreateInvoiceLink.deserializeResponse(CreateInvoiceLink.java:238)
at org.telegram.telegrambots.meta.api.methods.invoices.CreateInvoiceLink.deserializeResponse(CreateInvoiceLink.java:29)
at org.telegram.telegrambots.client.okhttp.OkHttpFutureCallback.onResponse(OkHttpFutureCallback.java:35)
To Reproduce
OkHttpTelegramClient telegramClient = new OkHttpTelegramClient("your token");
CreateInvoiceLinkBuilder createInvoiceLinkBuilder = CreateInvoiceLink.builder();
createInvoiceLinkBuilder.title("recharge stars");
createInvoiceLinkBuilder.description("recharge stars desc");
createInvoiceLinkBuilder.payload("{}");
createInvoiceLinkBuilder.currency("XTR");
createInvoiceLinkBuilder.providerToken("");
Collection prices = Lists.newArrayList(new LabeledPrice("价格1", 1),new LabeledPrice("价格2", 2));
createInvoiceLinkBuilder.prices(prices);
CreateInvoiceLink createInvoiceLink = createInvoiceLinkBuilder.build();
String url = telegramClient.execute(createInvoiceLink);
The text was updated successfully, but these errors were encountered: