payments.PaymentForm

class pyrogram.raw.base.payments.PaymentForm

Payment form

Constructors:

This base type has 3 constructors available.

payments.PaymentForm

Payment form

payments.PaymentFormStarGift

Represents a payment form for a gift, see here » for more info.

payments.PaymentFormStars

Represents a payment form, for payments to be using Telegram Stars, see here » for more info.

Functions:

This object can be returned by 1 function.

payments.GetPaymentForm

Get a payment form

TL Schema

payments.paymentForm#a0058751
flags:#
can_save_credentials:flags.2?true
password_missing:flags.3?true
form_id:long
bot_id:long
title:string
description:string
photo:flags.5?WebDocument
invoice:Invoice
provider_id:long
url:string
native_provider:flags.4?string
native_params:flags.4?DataJSON
additional_methods:flags.6?Vector<PaymentFormMethod>
saved_info:flags.0?PaymentRequestedInfo
saved_credentials:flags.1?Vector<PaymentSavedCredentials>
users:Vector<User>

= payments.PaymentForm

Parameter Tree

PaymentForm
├── can_save_credentialstrue (optional)
├── password_missingtrue (optional)
├── form_idlong
├── bot_idlong
├── titlestring
├── descriptionstring
├── photoWebDocument (optional)
│ ├── WebDocument
│ │ ├── urlstring
│ │ ├── access_hashlong
│ │ ├── sizeint
│ │ ├── mime_typestring
│ │ └── attributesVector < DocumentAttribute >
│ │ ├── DocumentAttributeImageSize
│ │ │ ├── wint
│ │ │ └── hint
│ │ ├── DocumentAttributeAnimated
│ │ ├── DocumentAttributeSticker
│ │ │ ├── masktrue (optional)
│ │ │ ├── altstring
│ │ │ ├── stickersetInputStickerSet
│ │ │ │ ├── InputStickerSetEmpty
│ │ │ │ ├── InputStickerSetID
│ │ │ │ ├── InputStickerSetShortName
│ │ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ │ ├── InputStickerSetDice
│ │ │ │ ├── InputStickerSetAnimatedEmojiAnimations
│ │ │ │ ├── InputStickerSetPremiumGifts
│ │ │ │ ├── InputStickerSetEmojiGenericAnimations
│ │ │ │ ├── InputStickerSetEmojiDefaultStatuses
│ │ │ │ ├── InputStickerSetEmojiDefaultTopicIcons
│ │ │ │ └── InputStickerSetTonGifts
│ │ │ └── mask_coordsMaskCoords (optional)
│ │ │ └── MaskCoords
│ │ ├── DocumentAttributeVideo
│ │ │ ├── round_messagetrue (optional)
│ │ │ ├── supports_streamingtrue (optional)
│ │ │ ├── nosoundtrue (optional)
│ │ │ ├── durationdouble
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ ├── preload_prefix_sizeint (optional)
│ │ │ ├── video_start_tsdouble (optional)
│ │ │ └── video_codecstring (optional)
│ │ ├── DocumentAttributeAudio
│ │ │ ├── voicetrue (optional)
│ │ │ ├── durationint
│ │ │ ├── titlestring (optional)
│ │ │ ├── performerstring (optional)
│ │ │ └── waveformbytes (optional)
│ │ ├── DocumentAttributeFilename
│ │ │ └── file_namestring
│ │ ├── freetrue (optional)
│ │ ├── text_colortrue (optional)
│ │ ├── altstring
│ │ └── stickersetInputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ ├── InputStickerSetShortName
│ │ ├── InputStickerSetDice
│ │ ├── InputStickerSetPremiumGifts
│ │ └── InputStickerSetTonGifts
│ └── WebDocumentNoProxy
│ ├── urlstring
│ ├── sizeint
│ ├── mime_typestring
│ └── attributesVector < DocumentAttribute >
│ │ ├── wint
│ │ └── hint
│ │ ├── masktrue (optional)
│ │ ├── altstring
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coordsMaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── round_messagetrue (optional)
│ │ ├── supports_streamingtrue (optional)
│ │ ├── nosoundtrue (optional)
│ │ ├── durationdouble
│ │ ├── wint
│ │ ├── hint
│ │ ├── preload_prefix_sizeint (optional)
│ │ ├── video_start_tsdouble (optional)
│ │ └── video_codecstring (optional)
│ │ ├── voicetrue (optional)
│ │ ├── durationint
│ │ ├── titlestring (optional)
│ │ ├── performerstring (optional)
│ │ └── waveformbytes (optional)
│ │ └── file_namestring
│ ├── freetrue (optional)
│ ├── text_colortrue (optional)
│ ├── altstring
│ └── stickersetInputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ ├── InputStickerSetDice
├── invoiceInvoice
│ └── Invoice
│ ├── testtrue (optional)
│ ├── name_requestedtrue (optional)
│ ├── phone_requestedtrue (optional)
│ ├── email_requestedtrue (optional)
│ ├── shipping_address_requestedtrue (optional)
│ ├── flexibletrue (optional)
│ ├── phone_to_providertrue (optional)
│ ├── email_to_providertrue (optional)
│ ├── recurringtrue (optional)
│ ├── currencystring
│ ├── pricesVector < LabeledPrice >
│ │ └── LabeledPrice
│ │ ├── labelstring
│ │ └── amountlong
│ ├── max_tip_amountlong (optional)
│ ├── suggested_tip_amountsVector < long > (optional)
│ ├── terms_urlstring (optional)
│ └── subscription_periodint (optional)
├── provider_idlong
├── urlstring
├── native_providerstring (optional)
├── native_paramsDataJSON (optional)
│ └── DataJSON
│ └── datastring
├── additional_methodsVector < PaymentFormMethod > (optional)
│ └── PaymentFormMethod
│ ├── urlstring
│ └── titlestring
├── saved_infoPaymentRequestedInfo (optional)
│ └── PaymentRequestedInfo
│ ├── namestring (optional)
│ ├── phonestring (optional)
│ ├── emailstring (optional)
│ └── shipping_addressPostAddress (optional)
│ └── PostAddress
│ ├── street_line1string
│ ├── street_line2string
│ ├── citystring
│ ├── statestring
│ ├── country_iso2string
│ └── post_codestring
├── saved_credentialsVector < PaymentSavedCredentials > (optional)
│ ├── idstring
│ └── titlestring
└── usersVector < User >
├── UserEmpty
│ └── idlong
└── User
├── is_selftrue (optional)
├── contacttrue (optional)
├── mutual_contacttrue (optional)
├── deletedtrue (optional)
├── bottrue (optional)
├── bot_chat_historytrue (optional)
├── bot_nochatstrue (optional)
├── verifiedtrue (optional)
├── restrictedtrue (optional)
├── mintrue (optional)
├── bot_inline_geotrue (optional)
├── supporttrue (optional)
├── scamtrue (optional)
├── apply_min_phototrue (optional)
├── faketrue (optional)
├── bot_attach_menutrue (optional)
├── premiumtrue (optional)
├── attach_menu_enabledtrue (optional)
├── bot_can_edittrue (optional)
├── close_friendtrue (optional)
├── stories_hiddentrue (optional)
├── stories_unavailabletrue (optional)
├── contact_require_premiumtrue (optional)
├── bot_businesstrue (optional)
├── bot_has_main_apptrue (optional)
├── bot_forum_viewtrue (optional)
├── bot_forum_can_manage_topicstrue (optional)
├── idlong
├── access_hashlong (optional)
├── first_namestring (optional)
├── last_namestring (optional)
├── usernamestring (optional)
├── phonestring (optional)
├── photoUserProfilePhoto (optional)
│ ├── UserProfilePhotoEmpty
│ └── UserProfilePhoto
│ ├── has_videotrue (optional)
│ ├── personaltrue (optional)
│ ├── photo_idlong
│ ├── stripped_thumbbytes (optional)
│ └── dc_idint
├── statusUserStatus (optional)
│ ├── UserStatusEmpty
│ ├── UserStatusOnline
│ │ └── expiresint
│ ├── UserStatusOffline
│ │ └── was_onlineint
│ ├── UserStatusRecently
│ │ └── by_metrue (optional)
│ ├── UserStatusLastWeek
│ │ └── by_metrue (optional)
│ └── UserStatusLastMonth
│ └── by_metrue (optional)
├── bot_info_versionint (optional)
├── restriction_reasonVector < RestrictionReason > (optional)
│ └── RestrictionReason
│ ├── platformstring
│ ├── reasonstring
│ └── textstring
├── bot_inline_placeholderstring (optional)
├── lang_codestring (optional)
├── emoji_statusEmojiStatus (optional)
│ ├── EmojiStatusEmpty
│ ├── EmojiStatus
│ │ ├── document_idlong
│ │ └── untilint (optional)
│ │ ├── collectible_idlong
│ │ ├── document_idlong
│ │ ├── titlestring
│ │ ├── slugstring
│ │ ├── pattern_document_idlong
│ │ ├── center_colorint
│ │ ├── edge_colorint
│ │ ├── pattern_colorint
│ │ ├── text_colorint
│ │ └── untilint (optional)
│ ├── collectible_idlong
│ └── untilint (optional)
├── usernamesVector < Username > (optional)
│ └── Username
│ ├── editabletrue (optional)
│ ├── activetrue (optional)
│ └── usernamestring
├── stories_max_idRecentStory (optional)
│ └── RecentStory
│ ├── livetrue (optional)
│ └── max_idint (optional)
├── colorPeerColor (optional)
│ ├── PeerColor
│ │ ├── colorint (optional)
│ │ └── background_emoji_idlong (optional)
│ ├── PeerColorCollectible
│ │ ├── collectible_idlong
│ │ ├── gift_emoji_idlong
│ │ ├── background_emoji_idlong
│ │ ├── accent_colorint
│ │ ├── colorsVector < int >
│ │ ├── dark_accent_colorint (optional)
│ │ └── dark_colorsVector < int > (optional)
│ └── collectible_idlong
├── profile_colorPeerColor (optional)
│ ├── PeerColor
│ │ ├── colorint (optional)
│ │ └── background_emoji_idlong (optional)
│ ├── PeerColorCollectible
│ │ ├── collectible_idlong
│ │ ├── gift_emoji_idlong
│ │ ├── background_emoji_idlong
│ │ ├── accent_colorint
│ │ ├── colorsVector < int >
│ │ ├── dark_accent_colorint (optional)
│ │ └── dark_colorsVector < int > (optional)
│ └── collectible_idlong
├── bot_active_usersint (optional)
├── bot_verification_iconlong (optional)
└── send_paid_messages_starslong (optional)

Example

PaymentForm(
    can_save_credentials=None,
    password_missing=None,
    form_id=0,
    bot_id=0,
    title="text",
    description="text",
    photo=WebDocument(
        url="https://google.com",
        access_hash=0,
        size=0,
        mime_type="text",
        attributes=[
                DocumentAttributeImageSize(
                    w=0,
                    h=0
                )
            ]
    ),
    invoice=Invoice(
        test=None,
        name_requested=None,
        phone_requested=None,
        email_requested=None,
        shipping_address_requested=None,
        flexible=None,
        phone_to_provider=None,
        email_to_provider=None,
        recurring=None,
        currency="text",
        prices=[
                LabeledPrice(
                    label="text",
                    amount=0
                )
            ],
        max_tip_amount=None,
        suggested_tip_amounts=None,
        terms_url=None,
        subscription_period=None
    ),
    provider_id=0,
    url="https://google.com",
    native_provider="text",
    native_params=DataJSON(data="text"),
    additional_methods=[
            PaymentFormMethod(
                url="https://google.com",
                title="text"
            )
        ],
    saved_info=PaymentRequestedInfo(
        name=None,
        phone=None,
        email=None,
        shipping_address=None
    ),
    saved_credentials=[
            PaymentSavedCredentialsCard(
                id="text",
                title="text"
            )
        ],
    users=[
            UserEmpty(id=0)
        ],
)