sendInvoice method

Future<Message> sendInvoice(
  1. ChatID chatId,
  2. String title,
  3. String description,
  4. String payload,
  5. String providerToken,
  6. String startParameter,
  7. String currency,
  8. List<LabeledPrice> prices, {
  9. String? providerData,
  10. String? photoUrl,
  11. int? photoSize,
  12. int? photoWidth,
  13. int? photoHeight,
  14. bool? needName,
  15. bool? needPhoneNumber,
  16. bool? needEmail,
  17. bool? needShippingAddress,
  18. bool? sendPhoneNumberToProvider,
  19. bool? sendEmailToProvider,
  20. bool? isFlexible,
  21. bool? disableNotification,
  22. bool? protectContent,
  23. int? replyToMessageId,
  24. bool? allowSendingWithoutReply,
  25. InlineKeyboardMarkup? replyMarkup,
})
inherited

Use this method to send invoices.

On success, the sent Message is returned.

Implementation

Future<Message> sendInvoice(
  ChatID chatId,
  String title,
  String description,
  String payload,
  String providerToken,
  String startParameter,
  String currency,
  List<LabeledPrice> prices, {
  String? providerData,
  String? photoUrl,
  int? photoSize,
  int? photoWidth,
  int? photoHeight,
  bool? needName,
  bool? needPhoneNumber,
  bool? needEmail,
  bool? needShippingAddress,
  bool? sendPhoneNumberToProvider,
  bool? sendEmailToProvider,
  bool? isFlexible,
  bool? disableNotification,
  bool? protectContent,
  int? replyToMessageId,
  bool? allowSendingWithoutReply,
  InlineKeyboardMarkup? replyMarkup,
}) {
  return _client.apiCall(_token, 'sendInvoice', {
    'chat_id': chatId,
    'title': title,
    'description': description,
    'payload': payload,
    'provider_token': providerToken,
    'start_parameter': startParameter,
    'currency': currency,
    'prices': prices,
    'provider_data': providerData,
    'photo_url': photoUrl,
    'photo_size': photoSize,
    'photo_width': photoWidth,
    'photo_height': photoHeight,
    'need_name': needName,
    'need_phone_number': needPhoneNumber,
    'need_email': needEmail,
    'need_shipping_address': needShippingAddress,
    'send_phone_number_to_provider': sendPhoneNumberToProvider,
    'send_email_to_provider': sendEmailToProvider,
    'is_flexible': isFlexible,
    'disable_notification': disableNotification,
    'protect_content': protectContent,
    'reply_to_message_id': replyToMessageId,
    'allow_sending_without_reply': allowSendingWithoutReply,
    'reply_markup': replyMarkup,
  });
}