payments.sendPaymentForm

Send compiled payment form

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.payments.sendPaymentForm({
        msgId: 6158322,
        requestedInfoId: 'random string here',
        shippingOptionId: 'random string here',
        credentials: new Api.InputPaymentCredentials({...}),
        }));
    console.log(result); // prints the result
})();

TL schema

Parameters

Name

Type

Description

flags

msg_id

Message ID of form

requested_info_id

ID of saved and validated order info

shipping_option_id

Chosen shipping option ID

credentials

Payment credentials

Result

payments.PaymentResult

Possible errors

Code

Type

Description

400

MESSAGE_ID_INVALID

The provided message id is invalid

Can bots use this methd ?

yes

Validated user-provided info

Last updated

Was this helpful?