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_credentials → true (optional)
├── password_missing → true (optional)
├── form_id → long
├── bot_id → long
├── title → string
├── description → string
├── photo → WebDocument (optional)
│ ├── WebDocument
│ │ ├── url → string
│ │ ├── access_hash → long
│ │ ├── size → int
│ │ ├── mime_type → string
│ │ └── attributes → Vector < DocumentAttribute >
│ │ ├── DocumentAttributeImageSize
│ │ │ ├── w → int
│ │ │ └── h → int
│ │ ├── DocumentAttributeAnimated
│ │ ├── DocumentAttributeSticker
│ │ │ ├── mask → true (optional)
│ │ │ ├── alt → string
│ │ │ ├── stickerset → InputStickerSet
│ │ │ │ ├── InputStickerSetEmpty
│ │ │ │ ├── InputStickerSetID
│ │ │ │ ├── InputStickerSetShortName
│ │ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ │ ├── InputStickerSetDice
│ │ │ │ ├── InputStickerSetAnimatedEmojiAnimations
│ │ │ │ ├── InputStickerSetPremiumGifts
│ │ │ │ ├── InputStickerSetEmojiGenericAnimations
│ │ │ │ ├── InputStickerSetEmojiDefaultStatuses
│ │ │ │ ├── InputStickerSetEmojiDefaultTopicIcons
│ │ │ │ └── InputStickerSetTonGifts
│ │ │ └── mask_coords → MaskCoords (optional)
│ │ │ └── MaskCoords
│ │ ├── DocumentAttributeVideo
│ │ │ ├── round_message → true (optional)
│ │ │ ├── supports_streaming → true (optional)
│ │ │ ├── nosound → true (optional)
│ │ │ ├── duration → double
│ │ │ ├── w → int
│ │ │ ├── h → int
│ │ │ ├── preload_prefix_size → int (optional)
│ │ │ ├── video_start_ts → double (optional)
│ │ │ └── video_codec → string (optional)
│ │ ├── DocumentAttributeAudio
│ │ │ ├── voice → true (optional)
│ │ │ ├── duration → int
│ │ │ ├── title → string (optional)
│ │ │ ├── performer → string (optional)
│ │ │ └── waveform → bytes (optional)
│ │ ├── DocumentAttributeFilename
│ │ │ └── file_name → string
│ │ ├── free → true (optional)
│ │ ├── text_color → true (optional)
│ │ ├── alt → string
│ │ └── stickerset → InputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ ├── InputStickerSetShortName
│ │ ├── InputStickerSetDice
│ │ ├── InputStickerSetPremiumGifts
│ │ └── InputStickerSetTonGifts
│ └── WebDocumentNoProxy
│ ├── url → string
│ ├── size → int
│ ├── mime_type → string
│ └── attributes → Vector < DocumentAttribute >
│ │ ├── w → int
│ │ └── h → int
│ │ ├── mask → true (optional)
│ │ ├── alt → string
│ │ ├── stickerset → InputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coords → MaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── round_message → true (optional)
│ │ ├── supports_streaming → true (optional)
│ │ ├── nosound → true (optional)
│ │ ├── duration → double
│ │ ├── w → int
│ │ ├── h → int
│ │ ├── preload_prefix_size → int (optional)
│ │ ├── video_start_ts → double (optional)
│ │ └── video_codec → string (optional)
│ │ ├── voice → true (optional)
│ │ ├── duration → int
│ │ ├── title → string (optional)
│ │ ├── performer → string (optional)
│ │ └── waveform → bytes (optional)
│ │ └── file_name → string
│ ├── free → true (optional)
│ ├── text_color → true (optional)
│ ├── alt → string
│ └── stickerset → InputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ ├── InputStickerSetDice
├── invoice → Invoice
│ └── Invoice
│ ├── test → true (optional)
│ ├── name_requested → true (optional)
│ ├── phone_requested → true (optional)
│ ├── email_requested → true (optional)
│ ├── shipping_address_requested → true (optional)
│ ├── flexible → true (optional)
│ ├── phone_to_provider → true (optional)
│ ├── email_to_provider → true (optional)
│ ├── recurring → true (optional)
│ ├── currency → string
│ ├── prices → Vector < LabeledPrice >
│ │ └── LabeledPrice
│ │ ├── label → string
│ │ └── amount → long
│ ├── max_tip_amount → long (optional)
│ ├── suggested_tip_amounts → Vector < long > (optional)
│ ├── terms_url → string (optional)
│ └── subscription_period → int (optional)
├── provider_id → long
├── url → string
├── native_provider → string (optional)
├── native_params → DataJSON (optional)
│ └── DataJSON
│ └── data → string
├── additional_methods → Vector < PaymentFormMethod > (optional)
│ └── PaymentFormMethod
│ ├── url → string
│ └── title → string
├── saved_info → PaymentRequestedInfo (optional)
│ └── PaymentRequestedInfo
│ ├── name → string (optional)
│ ├── phone → string (optional)
│ ├── email → string (optional)
│ └── shipping_address → PostAddress (optional)
│ └── PostAddress
│ ├── street_line1 → string
│ ├── street_line2 → string
│ ├── city → string
│ ├── state → string
│ ├── country_iso2 → string
│ └── post_code → string
├── saved_credentials → Vector < PaymentSavedCredentials > (optional)
│ ├── id → string
│ └── title → string
└── users → Vector < User >
├── UserEmpty
│ └── id → long
└── User
├── is_self → true (optional)
├── contact → true (optional)
├── mutual_contact → true (optional)
├── deleted → true (optional)
├── bot → true (optional)
├── bot_chat_history → true (optional)
├── bot_nochats → true (optional)
├── verified → true (optional)
├── restricted → true (optional)
├── min → true (optional)
├── bot_inline_geo → true (optional)
├── support → true (optional)
├── scam → true (optional)
├── apply_min_photo → true (optional)
├── fake → true (optional)
├── bot_attach_menu → true (optional)
├── premium → true (optional)
├── attach_menu_enabled → true (optional)
├── bot_can_edit → true (optional)
├── close_friend → true (optional)
├── stories_hidden → true (optional)
├── stories_unavailable → true (optional)
├── contact_require_premium → true (optional)
├── bot_business → true (optional)
├── bot_has_main_app → true (optional)
├── bot_forum_view → true (optional)
├── bot_forum_can_manage_topics → true (optional)
├── bot_can_manage_bots → true (optional)
├── bot_guestchat → true (optional)
├── bot_guard → true (optional)
├── id → long
├── access_hash → long (optional)
├── first_name → string (optional)
├── last_name → string (optional)
├── username → string (optional)
├── phone → string (optional)
├── photo → UserProfilePhoto (optional)
│ ├── UserProfilePhotoEmpty
│ └── UserProfilePhoto
│ ├── has_video → true (optional)
│ ├── personal → true (optional)
│ ├── photo_id → long
│ ├── stripped_thumb → bytes (optional)
│ └── dc_id → int
├── status → UserStatus (optional)
│ ├── UserStatusEmpty
│ ├── UserStatusOnline
│ │ └── expires → int
│ ├── UserStatusOffline
│ │ └── was_online → int
│ ├── UserStatusRecently
│ │ └── by_me → true (optional)
│ ├── UserStatusLastWeek
│ │ └── by_me → true (optional)
│ └── UserStatusLastMonth
│ └── by_me → true (optional)
├── bot_info_version → int (optional)
├── restriction_reason → Vector < RestrictionReason > (optional)
│ └── RestrictionReason
│ ├── platform → string
│ ├── reason → string
│ └── text → string
├── bot_inline_placeholder → string (optional)
├── lang_code → string (optional)
├── emoji_status → EmojiStatus (optional)
│ ├── EmojiStatusEmpty
│ ├── EmojiStatus
│ │ ├── document_id → long
│ │ └── until → int (optional)
│ │ ├── collectible_id → long
│ │ ├── document_id → long
│ │ ├── title → string
│ │ ├── slug → string
│ │ ├── pattern_document_id → long
│ │ ├── center_color → int
│ │ ├── edge_color → int
│ │ ├── pattern_color → int
│ │ ├── text_color → int
│ │ └── until → int (optional)
│ ├── collectible_id → long
│ └── until → int (optional)
├── usernames → Vector < Username > (optional)
│ └── Username
│ ├── editable → true (optional)
│ ├── active → true (optional)
│ └── username → string
├── stories_max_id → RecentStory (optional)
│ └── RecentStory
│ ├── live → true (optional)
│ └── max_id → int (optional)
├── color → PeerColor (optional)
│ ├── PeerColor
│ │ ├── color → int (optional)
│ │ └── background_emoji_id → long (optional)
│ ├── PeerColorCollectible
│ │ ├── collectible_id → long
│ │ ├── gift_emoji_id → long
│ │ ├── background_emoji_id → long
│ │ ├── accent_color → int
│ │ ├── colors → Vector < int >
│ │ ├── dark_accent_color → int (optional)
│ │ └── dark_colors → Vector < int > (optional)
│ └── collectible_id → long
├── profile_color → PeerColor (optional)
│ ├── PeerColor
│ │ ├── color → int (optional)
│ │ └── background_emoji_id → long (optional)
│ ├── PeerColorCollectible
│ │ ├── collectible_id → long
│ │ ├── gift_emoji_id → long
│ │ ├── background_emoji_id → long
│ │ ├── accent_color → int
│ │ ├── colors → Vector < int >
│ │ ├── dark_accent_color → int (optional)
│ │ └── dark_colors → Vector < int > (optional)
│ └── collectible_id → long
├── bot_active_users → int (optional)
├── bot_verification_icon → long (optional)
└── send_paid_messages_stars → long (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)
        ],
)