send_payment_form()#

Client.send_payment_form()#

Pay an invoice.

Note

For now only stars invoices are supported.

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 pay this invoice.

Returns:

bool – On success, True is returned.

Example

# Pay invoice from message
app.send_payment_form(chat_id=chat_id, message_id=123)

# Pay invoice form from link
app.send_payment_form(invoice_link="https://t.me/$xvbzUtt5sUlJCAAATqZrWRy9Yzk")