telegram api method · layer 229 · #09c2dd95
messages.setBotPrecheckoutResults
Once the user has confirmed their payment and shipping details, the bot receives an updateBotPrecheckoutQuery update.
Use this method to respond to such pre-checkout queries.
Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent.
definition
messages.setBotPrecheckoutResults#9c2dd95 flags:# success:flags.1?true query_id:long error:flags.0?string = Bool;
parameters
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
success | true | Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead |
query_id | long | Unique identifier for the query to be answered |
error | string | Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. |
returns
errors (4)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 400 | ERROR_TEXT_EMPTY | The provided error message is empty. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
history
present in layers 65–229
| id | layers |
|---|---|
| #09c2dd95 | 65–229 |