get_payment_form()#

Client.get_payment_form()#

Get information about a invoice or paid media.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat. of the target channel/supergroup (in the format @username).

  • message_id (int) – Pass a message identifier or to get the invoice from message.

  • invoice_link (str) – Pass a invoice link in form of a t.me/$… link or slug itself to get the payment form from link.

Returns:

PaymentForm – On success, a payment form is returned.

Example

# get payment form from message
app.get_payment_form(chat_id=chat_id, message_id=123)

# get payment form from link
app.get_payment_form(invoice_link="https://t.me/$xvbzUtt5sUlJCAAATqZrWRy9Yzk")