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
})();import {Api, TelegramClient} from 'telegram';
import {StringSession} from 'telegram/sessions';
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result: Api.payments.PaymentResult = 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
Result
Possible errors
Code
Type
Description
400
MESSAGE_ID_INVALID
The provided message id is invalid
Can bots use this methd ?
yes
Related pages
Validated user-provided info
Last updated
Was this helpful?