MadelineProtoDocs/docs/API_docs/methods/payments.sendPaymentForm.md
2024-05-01 14:53:46 +02:00

2.1 KiB

title description grand_parent parent image redirect_from
payments.sendPaymentForm Send compiled payment form Telegram RPC API Methods https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png /API_docs/methods/payments_sendPaymentForm.html

Method: payments.sendPaymentForm

Back to methods index

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 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, );