payments.PaymentForm

class pyrogram.raw.types.payments.PaymentForm

Payment form

Constructor of PaymentForm.

Details:
  • Layer: 223

  • ID: A0058751

Parameters:
  • form_id (int 64-bit) – Form ID

  • bot_id (int 64-bit) – Bot ID

  • title (str) – Form title

  • description (str) – Description

  • invoice (Invoice) – Invoice

  • provider_id (int 64-bit) – Payment provider ID.

  • url (str) – Payment form URL

  • users (List of User) – Users

  • can_save_credentials (bool, optional) – Whether the user can choose to save credentials.

  • password_missing (bool, optional) – Indicates that the user can save payment credentials, but only after setting up a 2FA password (currently the account doesn’t have a 2FA password)

  • photo (WebDocument, optional) – Product photo

  • native_provider (str, optional) – Payment provider name.One of the following:- stripe

  • native_params (DataJSON, optional) – Contains information about the payment provider, if available, to support it natively without the need for opening the URL.A JSON object that can contain the following fields:- apple_pay_merchant_id: Apple Pay merchant ID- google_pay_public_key: Google Pay public key- need_country: True, if the user country must be provided,- need_zip: True, if the user ZIP/postal code must be provided,- need_cardholder_name: True, if the cardholder name must be provided

  • additional_methods (List of PaymentFormMethod, optional) – Additional payment methods

  • saved_info (PaymentRequestedInfo, optional) – Saved server-side order information

  • saved_credentials (List of PaymentSavedCredentials, optional) – Contains information about saved card credentials

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(
    form_id=0,
    bot_id=0,
    title="text",
    description="text",
    invoice=Invoice(
        currency="text",
        prices=[
                LabeledPrice(
                    label="text",
                    amount=0
                )
            ]
    ),
    provider_id=0,
    url="https://google.com",
    users=[
            UserEmpty(id=0)
        ],
)