SendInvoiceRequest

data class SendInvoiceRequest(chatId: Int, title: String, description: String, payload: String, providerToken: String, startParameter: String, currency: String, prices: List<LabeledPrice>, providerData: String?, photoUrl: String?, photoSize: Int?, photoWidth: Int?, photoHeight: Int?, needName: Boolean, needPhoneNumber: Boolean, needEmail: Boolean, needShippingAddress: Boolean, sendPhoneNumberToProvider: Boolean, sendEmailToProvider: Boolean, isFlexible: Boolean, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: InlineKeyboardMarkup?)

Request body for sendInvoice

Parameters

chatId

Unique identifier for the target private chat

title

Product name, 1-32 characters

description

Product description, 1-255 characters

payload

Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.

providerToken

Payments provider token, obtained via Botfather

startParameter

Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter

currency

Three-letter ISO 4217 currency code, see more on currencies

prices

Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)

providerData

A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.

photoUrl

URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.

photoSize

Photo size

photoWidth

Photo width

photoHeight

Photo height

needName

Pass True, if you require the user's full name to complete the order

needPhoneNumber

Pass True, if you require the user's phone number to complete the order

needEmail

Pass True, if you require the user's email address to complete the order

needShippingAddress

Pass True, if you require the user's shipping address to complete the order

sendPhoneNumberToProvider

Pass True, if user's phone number should be sent to provider

sendEmailToProvider

Pass True, if user's email address should be sent to provider

isFlexible

Pass True, if the final price depends on the shipping method

disableNotification

Sends the message silently. Users will receive a notification with no sound.

replyToMessageId

If the message is a reply, ID of the original message

allowSendingWithoutReply

Pass True, if the message should be sent even if the specified replied-to message is not found

replyMarkup

A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.

Constructors

SendInvoiceRequest
Link copied to clipboard
common
fun SendInvoiceRequest(chatId: Int, title: String, description: String, payload: String, providerToken: String, startParameter: String, currency: String, prices: List<LabeledPrice> = emptyList(), providerData: String? = null, photoUrl: String? = null, photoSize: Int? = null, photoWidth: Int? = null, photoHeight: Int? = null, needName: Boolean = false, needPhoneNumber: Boolean = false, needEmail: Boolean = false, needShippingAddress: Boolean = false, sendPhoneNumberToProvider: Boolean = false, sendEmailToProvider: Boolean = false, isFlexible: Boolean = false, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: InlineKeyboardMarkup? = null)
Unique identifier for the target private chat

Functions

component1
Link copied to clipboard
common
operator fun component1(): Int
component10
Link copied to clipboard
common
operator fun component10(): String?
component11
Link copied to clipboard
common
operator fun component11(): Int?
component12
Link copied to clipboard
common
operator fun component12(): Int?
component13
Link copied to clipboard
common
operator fun component13(): Int?
component14
Link copied to clipboard
common
operator fun component14(): Boolean
component15
Link copied to clipboard
common
operator fun component15(): Boolean
component16
Link copied to clipboard
common
operator fun component16(): Boolean
component17
Link copied to clipboard
common
operator fun component17(): Boolean
component18
Link copied to clipboard
common
operator fun component18(): Boolean
component19
Link copied to clipboard
common
operator fun component19(): Boolean
component2
Link copied to clipboard
common
operator fun component2(): String
component20
Link copied to clipboard
common
operator fun component20(): Boolean
component21
Link copied to clipboard
common
operator fun component21(): Boolean
component22
Link copied to clipboard
common
operator fun component22(): Int?
component23
Link copied to clipboard
common
operator fun component23(): Boolean
component24
Link copied to clipboard
common
operator fun component24(): InlineKeyboardMarkup?
component3
Link copied to clipboard
common
operator fun component3(): String
component4
Link copied to clipboard
common
operator fun component4(): String
component5
Link copied to clipboard
common
operator fun component5(): String
component6
Link copied to clipboard
common
operator fun component6(): String
component7
Link copied to clipboard
common
operator fun component7(): String
component8
Link copied to clipboard
common
operator fun component8(): List<LabeledPrice>
component9
Link copied to clipboard
common
operator fun component9(): String?
copy
Link copied to clipboard
common
fun copy(chatId: Int, title: String, description: String, payload: String, providerToken: String, startParameter: String, currency: String, prices: List<LabeledPrice> = emptyList(), providerData: String? = null, photoUrl: String? = null, photoSize: Int? = null, photoWidth: Int? = null, photoHeight: Int? = null, needName: Boolean = false, needPhoneNumber: Boolean = false, needEmail: Boolean = false, needShippingAddress: Boolean = false, sendPhoneNumberToProvider: Boolean = false, sendEmailToProvider: Boolean = false, isFlexible: Boolean = false, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: InlineKeyboardMarkup? = null): SendInvoiceRequest
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

allowSendingWithoutReply
Link copied to clipboard
common
val allowSendingWithoutReply: Boolean = false
Pass True, if the message should be sent even if the specified replied-to message is not found
chatId
Link copied to clipboard
common
val chatId: Int
Unique identifier for the target private chat
currency
Link copied to clipboard
common
val currency: String
Three-letter ISO 4217 currency code, see more on currencies
description
Link copied to clipboard
common
val description: String
Product description, 1-255 characters
disableNotification
Link copied to clipboard
common
val disableNotification: Boolean = false
Sends the message silently.
isFlexible
Link copied to clipboard
common
val isFlexible: Boolean = false
Pass True, if the final price depends on the shipping method
needEmail
Link copied to clipboard
common
val needEmail: Boolean = false
Pass True, if you require the user's email address to complete the order
needName
Link copied to clipboard
common
val needName: Boolean = false
Pass True, if you require the user's full name to complete the order
needPhoneNumber
Link copied to clipboard
common
val needPhoneNumber: Boolean = false
Pass True, if you require the user's phone number to complete the order
needShippingAddress
Link copied to clipboard
common
val needShippingAddress: Boolean = false
Pass True, if you require the user's shipping address to complete the order
payload
Link copied to clipboard
common
val payload: String
Bot-defined invoice payload, 1-128 bytes.
photoHeight
Link copied to clipboard
common
val photoHeight: Int? = null
Photo height
photoSize
Link copied to clipboard
common
val photoSize: Int? = null
Photo size
photoUrl
Link copied to clipboard
common
val photoUrl: String? = null
URL of the product photo for the invoice.
photoWidth
Link copied to clipboard
common
val photoWidth: Int? = null
Photo width
prices
Link copied to clipboard
common
val prices: List<LabeledPrice>
Price breakdown, a JSON-serialized list of components (e.g.
providerData
Link copied to clipboard
common
val providerData: String? = null
A JSON-serialized data about the invoice, which will be shared with the payment provider.
providerToken
Link copied to clipboard
common
val providerToken: String
Payments provider token, obtained via Botfather
replyMarkup
Link copied to clipboard
common
val replyMarkup: InlineKeyboardMarkup? = null
A JSON-serialized object for an inline keyboard.
replyToMessageId
Link copied to clipboard
common
val replyToMessageId: Int? = null
If the message is a reply, ID of the original message
sendEmailToProvider
Link copied to clipboard
common
val sendEmailToProvider: Boolean = false
Pass True, if user's email address should be sent to provider
sendPhoneNumberToProvider
Link copied to clipboard
common
val sendPhoneNumberToProvider: Boolean = false
Pass True, if user's phone number should be sent to provider
startParameter
Link copied to clipboard
common
val startParameter: String
Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter
title
Link copied to clipboard
common
val title: String
Product name, 1-32 characters