Link Search Menu Expand Document

Method: payments.sendPaymentForm

Back to methods index

Send compiled payment form

Parameters:

NameTypeDescriptionRequired
form_idlongForm IDYes
invoiceInputInvoiceInvoiceYes
requested_info_idstringID of saved and validated order infoOptional
shipping_option_idstringChosen shipping option IDOptional
credentialsInputPaymentCredentialsPayment credentialsYes
tip_amountlongTip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).Optional

Return type: payments.PaymentResult

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

// PHP 8+ syntax, use an array on PHP 7.
$payments_PaymentResult = $MadelineProto->payments->sendPaymentForm(form_id: long, invoice: InputInvoice, requested_info_id: 'string', shipping_option_id: 'string', credentials: InputPaymentCredentials, tip_amount: long, );