Layer 220
method Bots
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 flags.1?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
QueryId long Unique identifier for the query to be answered
Error flags.0?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

Bool

Possible Errors

Code Type Description
400 ERROR_TEXT_EMPTY The provided error message is empty.
400 USER_BOT_REQUIRED This method can only be called by a bot.

Gogram Example

// MessagesSetBotPrecheckoutResults - using Params struct
result, err := client.MessagesSetBotPrecheckoutResults(&tg.MessagesSetBotPrecheckoutResultsParams{
    QueryId: int64(0),

    // Optional fields:
    // Success: true,
    // Error: "...",
})
if err != nil {
    // handle error
}
// result is *tg.Bool