MadelineProtoDocs/old_docs/API_docs_v18/constructors/payments.paymentForm.md
2020-06-16 17:50:25 +02:00

3.0 KiB

title description image redirect_from
payments.paymentForm Payment form https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png /API_docs/constructors/payments_paymentForm.html

Constructor: payments.paymentForm

Back to constructors index

Payment form

Attributes:

Name Type Required Description
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)
bot_id int Yes Bot ID
invoice Invoice Yes Invoice
provider_id int Yes Payment provider ID.
url string Yes Payment form URL
native_provider string 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:

- publishable_key: Stripe API publishable key
- apple_pay_merchant_id: Apple Pay merchant ID
- android_pay_public_key: Android Pay public key
- android_pay_bgcolor: Android Pay form background color
- android_pay_inverse: Whether to use the dark theme in the Android Pay form
- 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
saved_info PaymentRequestedInfo Optional Saved server-side order information
saved_credentials PaymentSavedCredentials Optional Contains information about saved card credentials
users Array of User Yes Users

Type: payments.PaymentForm

Example:

$payments.paymentForm = ['_' => 'payments.paymentForm', 'can_save_credentials' => Bool, 'password_missing' => Bool, 'bot_id' => int, 'invoice' => Invoice, 'provider_id' => int, 'url' => 'string', 'native_provider' => 'string', 'native_params' => DataJSON, 'saved_info' => PaymentRequestedInfo, 'saved_credentials' => PaymentSavedCredentials, 'users' => [User, User]];

Or, if you're into Lua:

payments.paymentForm={_='payments.paymentForm', can_save_credentials=Bool, password_missing=Bool, bot_id=int, invoice=Invoice, provider_id=int, url='string', native_provider='string', native_params=DataJSON, saved_info=PaymentRequestedInfo, saved_credentials=PaymentSavedCredentials, users={User}}