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

payments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult;
payments.paymentVerificationNeeded#d8411139 url:string = payments.PaymentResult;
---functions---
payments.sendPaymentForm#2b8879b3 flags:# msg_id:int requested_info_id:flags.0?string shipping_option_id:flags.1?string credentials:InputPaymentCredentials = payments.PaymentResult;

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