sendInvoice
Send an invoice. BOT-ONLY
Parameters
The identifier of a chat to send the invoice to.
The invoice’s title.
The invoice’s description.
The invoice’s payload.
The invoice’s currency.
The invoice’s price tags.
Whether to send the message in a silent way without making a sound on the recipients’ clients.
Whether to protect the contents of the message from copying and forwarding.
Information on what the message is replying to.
The identifier of a thread to send the message to.
The identifier of a chat to send the message on behalf of. User-only.
The identifier of a message effect to be attached to the message.
If specified, the message will be scheduled to be sent at that date. User-only.
The identifier of a business connection ID to perform the action on. Bot-only.
The reply markup of the message. Bot-only.
Result
The sent invoice.
Syntax
// Required parameters only.
await client.sendInvoice(chatId, title, description, payload, currency, prices);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.sendInvoice(chatId, title, description, payload, currency, prices, {
    providerToken,
    maxTipAmount,
    suggestedTipAmounts,
    startParameter,
    providerData,
    photoUrl,
    photoSize,
    photoWidth,
    photoHeight,
    needName,
    needPhoneNumber,
    needEmail,
    needShippingAddress,
    sendPhoneNumberToProvider,
    sendEmailToProvider,
    flexible,
    disableNotification,
    protectContent,
    replyTo,
    messageThreadId,
    sendAs,
    effectId,
    sendAt,
    businessConnectionId,
    paidBroadcast,
    replyMarkup,
});