Method: payments.sendPaymentForm
Send compiled payment form
Parameters:
Name | Type | Description | Required |
---|---|---|---|
form_id | long | Form ID | Yes |
invoice | InputInvoice | Invoice | Yes |
requested_info_id | string | ID of saved and validated order info | Optional |
shipping_option_id | string | Chosen shipping option ID | Optional |
credentials | InputPaymentCredentials | Payment credentials | Yes |
tip_amount | long | Tip, 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 userbots use this method: YES
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();
$payments_PaymentResult = $MadelineProto->payments->sendPaymentForm(form_id: $long, invoice: $InputInvoice, requested_info_id: 'string', shipping_option_id: 'string', credentials: $InputPaymentCredentials, tip_amount: $long, );