get_payment_form()

Client.get_payment_form()

Get an invoice payment form.

This method must be called when the user presses inline button of the type InlineKeyboardButton with buy parameter, or wants to buy access to media in a paid media message.

Usable by Users Bots

Parameters:

input_invoice (InputInvoice) – The invoice.

Returns:

PaymentForm – On success, a payment form is returned.

Example

await app.get_payment_form(
    types.InputInvoiceMessage(
        chat_id=chat_id,
        message_id=123
    )
)

await app.get_payment_form(
    types.InputInvoiceName(
        name="https://t.me/$xvbzUtt5sUlJCAAATqZrWRy9Yzk"
    )
)