Skip to content

export Class

Invoice ​

extends ​

Builder

implements ​

StoredInvoice

Constructor ​

ts
new Invoice( title, description, currency, payload )
ParameterTypeDescription
titlestringThe title of the invoice.
descriptionstringThe description of the invoice.
currencystringThe currency you will accept.
payload?stringBot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. If left empty it will be set as id in invoices.create, but otherwise it is required.

Properties ​

currency : string ​

description : string ​

disable_notification? : boolean ​

is_flexible? : boolean ​

max_tip_amount? : number ​

message_effect_id? : string ​

need_email? : boolean ​

need_name? : boolean ​

need_phone_number? : boolean ​

need_shipping_address? : boolean ​

payload : string ​

photo_height? : number ​

photo_size? : number ​

photo_url? : string ​

photo_width? : number ​

prices : LabeledPrices ​

protect_content? : boolean ​

provider_data? : string ​

reply_markup? : InlineKeyboardMarkup ​

reply_parameters? : ReplyParameters ​

send_email_to_provider? : boolean ​

send_phone_number_to_provider? : boolean ​

start_parameter? : string ​

suggested_tip_amounts? : number[] ​

title : string ​

Methods ​

addPrice( label, amount ) ​

ParameterTypeDescription
labelstring
amountnumber

Returns: Invoice

setCurrency( currency ) ​

ParameterTypeDescription
currencystring

Returns: Invoice

setDescription( description ) ​

ParameterTypeDescription
descriptionstring

Returns: Invoice

setDisableNotification( disableNotification ) ​

ParameterTypeDescription
disableNotificationboolean

Returns: Invoice

setIsFlexible( isFlexible ) ​

ParameterTypeDescription
isFlexibleboolean

Returns: Invoice

setMaxTipAmount( maxTipAmount ) ​

ParameterTypeDescription
maxTipAmountnumber

Returns: Invoice

setMessageEffectId( messageEffectId ) ​

ParameterTypeDescription
messageEffectIdstring

Returns: Invoice

setNeedEmail( needEmail ) ​

ParameterTypeDescription
needEmailboolean

Returns: Invoice

setNeedName( needName ) ​

ParameterTypeDescription
needNameboolean

Returns: Invoice

setNeedPhoneNumber( needPhoneNumber ) ​

ParameterTypeDescription
needPhoneNumberboolean

Returns: Invoice

setNeedShippingAddress( needShippingAddress ) ​

ParameterTypeDescription
needShippingAddressboolean

Returns: Invoice

setPayload( payload ) ​

ParameterTypeDescription
payloadstring

Returns: Invoice

setPhotoHeight( photoHeight ) ​

ParameterTypeDescription
photoHeightnumber

Returns: Invoice

setPhotoSize( photoSize ) ​

ParameterTypeDescription
photoSizenumber

Returns: Invoice

setPhotoUrl( photoUrl ) ​

ParameterTypeDescription
photoUrlstring

Returns: Invoice

setPhotoWidth( photoWidth ) ​

ParameterTypeDescription
photoWidthnumber

Returns: Invoice

setProtectContent( protectContent ) ​

ParameterTypeDescription
protectContentboolean

Returns: Invoice

setProviderData( providerData ) ​

ParameterTypeDescription
providerDatastring

Returns: Invoice

setProviderToken( providerToken ) ​

ParameterTypeDescription
providerTokenstring

Returns: Invoice

setReplyMarkup( replyMarkup ) ​

ParameterTypeDescription
replyMarkupInlineKeyboardMarkup

Returns: Invoice

setReplyParameters( replyParameters ) ​

ParameterTypeDescription
replyParametersReplyParameters

Returns: Invoice

setSendEmailToProvider( sendEmailToProvider ) ​

ParameterTypeDescription
sendEmailToProviderboolean

Returns: Invoice

setSendPhoneNumberToProvider( sendPhoneNumberToProvider ) ​

ParameterTypeDescription
sendPhoneNumberToProviderboolean

Returns: Invoice

setStartParameter( startParameter ) ​

ParameterTypeDescription
startParameterstring

Returns: Invoice

setSuggestedTipAmounts( suggestedTipAmounts ) ​

ParameterTypeDescription
suggestedTipAmountsnumber[]

Returns: Invoice

setTitle( title ) ​

ParameterTypeDescription
titlestring

Returns: Invoice