UpdateBotPrecheckoutQuery

class pyrogram.raw.types.UpdateBotPrecheckoutQuery

This object contains information about an incoming pre-checkout query.

Constructor of Update.

Details:
  • Layer: 223

  • ID: 8CAA9A96

Parameters:
  • query_id (int 64-bit) – Unique query identifier

  • user_id (int 64-bit) – User who sent the query

  • payload (bytes) – Bot specified invoice payload

  • currency (str) – Three-letter ISO 4217 currency code, or XTR for Telegram Stars.

  • total_amount (int 64-bit) – Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

  • info (PaymentRequestedInfo, optional) – Order info provided by the user

  • shipping_option_id (str, optional) – Identifier of the shipping option chosen by the user

TL Schema

updateBotPrecheckoutQuery#8caa9a96
flags:#
query_id:long
user_id:long
payload:bytes
info:flags.0?PaymentRequestedInfo
shipping_option_id:flags.1?string
currency:string
total_amount:long

= Update

Parameter Tree

UpdateBotPrecheckoutQuery
├── query_idlong
├── user_idlong
├── payloadbytes
├── infoPaymentRequestedInfo (optional)
│ └── PaymentRequestedInfo
│ ├── namestring (optional)
│ ├── phonestring (optional)
│ ├── emailstring (optional)
│ └── shipping_addressPostAddress (optional)
│ └── PostAddress
│ ├── street_line1string
│ ├── street_line2string
│ ├── citystring
│ ├── statestring
│ ├── country_iso2string
│ └── post_codestring
├── shipping_option_idstring (optional)
├── currencystring
└── total_amountlong

Example

UpdateBotPrecheckoutQuery(
    query_id=0,
    user_id=0,
    payload=b"data",
    currency="text",
    total_amount=0,
)