method ApiMethods.sendInvoice
ApiMethods.sendInvoice(args: { chat_id: number | string; message_thread_id?: number; direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: readonly LabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; suggested_post_parameters?: SuggestedPostParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: ReplyParameters; reply_markup?: InlineKeyboardMarkup; reply_to_message_id?: number; }): Message.InvoiceMessage

Use this method to send invoices. On success, the sent Message is returned.

Parameters

args: { chat_id: number | string; message_thread_id?: number; direct_messages_topic_id?: number; title: string; description: string; payload: string; provider_token?: string; currency: string; prices: readonly LabeledPrice[]; max_tip_amount?: number; suggested_tip_amounts?: number[]; start_parameter?: string; provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; photo_height?: number; need_name?: boolean; need_phone_number?: boolean; need_email?: boolean; need_shipping_address?: boolean; send_phone_number_to_provider?: boolean; send_email_to_provider?: boolean; is_flexible?: boolean; suggested_post_parameters?: SuggestedPostParameters; disable_notification?: boolean; protect_content?: boolean; allow_paid_broadcast?: boolean; message_effect_id?: string; reply_parameters?: ReplyParameters; reply_markup?: InlineKeyboardMarkup; reply_to_message_id?: number; }

Return Type

Usage

import { type ApiMethods } from "types";