Actions101
- Bot Actions
- Chat Actions
- Get Chat
- Get Chat Administrators
- Get Chat Member Count
- Get Chat Member
- Ban Chat Member
- Unban Chat Member
- Restrict Chat Member
- Promote Chat Member
- Set Chat Administrator Custom Title
- Set Chat Permissions
- Export Chat Invite Link
- Create Chat Invite Link
- Edit Chat Invite Link
- Revoke Chat Invite Link
- Approve Chat Join Request
- Decline Chat Join Request
- Set Chat Photo
- Delete Chat Photo
- Set Chat Title
- Set Chat Description
- Pin Chat Message
- Unpin Chat Message
- Unpin All Chat Messages
- Leave Chat
- Set Chat Menu Button
- Get Chat Menu Button
- Set Chat Sticker Set
- Delete Chat Sticker Set
- File Actions
- Forum Actions
- Game Actions
- Inline Actions
- Message Actions
- Send Message
- Forward Message
- Copy Message
- Send Photo
- Send Audio
- Send Document
- Send Video
- Send Animation
- Send Voice
- Send Video Note
- Send Media Group
- Send Location
- Send Venue
- Send Contact
- Send Poll
- Send Dice
- Send Chat Action
- Edit Message Text
- Edit Message Caption
- Edit Message Media
- Edit Message Reply Markup
- Edit Message Live Location
- Stop Message Live Location
- Stop Poll
- Delete Message
- Delete Messages
- Payment Actions
- Sticker Actions
- Update Actions
- Webhook Actions
Payment → Answer Pre Checkout Query
AI-generatedSummary
Send a response to a Telegram pre-checkout query to confirm whether the bot is ready to proceed with the payment order or to provide an error message if not.
Inputs
- Pre-Checkout Query ID (required) — Unique identifier for the pre-checkout query to answer.
- OK (required) — Boolean indicating whether the bot is ready to proceed with the order (true) or not (false).
- Error Message — Error message to show to the user if OK is false, explaining why the bot cannot proceed.
Output shape
a single response object indicating success or error from the Telegram API
Returns the Telegram API response for the answerPreCheckoutQuery method. If the response has a result field which is an object or array, it is passed through as JSON output.
Examples
Example 1: Confirm successfully the pre-checkout query to proceed with payment.
Set 'Pre-Checkout Query ID' with the query id received, set 'OK' to true.
Example 2: Reject a pre-checkout query with an error message.
Set 'Pre-Checkout Query ID' with the query id received, set 'OK' to false and provide an 'Error Message' explaining why the order cannot proceed.