Link Search Menu Expand Document

Method: payments.getPaymentForm

Back to methods index

Get a payment form

Parameters:

NameTypeDescriptionRequired
invoiceInputInvoiceInvoiceYes
theme_paramsDataJSONA JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color
Optional

Return type: payments.PaymentForm

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_PaymentForm = $MadelineProto->payments->getPaymentForm(invoice: InputInvoice, theme_params: DataJSON, );