payments.validateRequestedInfo

Submit requested order information for validation

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.validateRequestedInfo({
        save: true,
        msgId: 9171703,
        info: new Api.PaymentRequestedInfo({...}),
        }));
    console.log(result); // prints the result
})();

TL schema

payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
---functions---
payments.validateRequestedInfo#770a8e74 flags:# save:flags.0?true msg_id:int info:PaymentRequestedInfo = payments.ValidatedRequestedInfo;

Parameters

Name

Type

Description

flags

save

Save order information to re-use it for future orders

msg_id

Message ID of payment form

info

Requested order information

Result

payments.ValidatedRequestedInfo

Possible errors

Code

Type

Description

400

MESSAGE_ID_INVALID

The provided message id is invalid

Can bots use this methd ?

yes

Last updated