export Class
Invoice ​
extends ​
Builder
implements ​
Constructor ​
ts
new Invoice( title, description, currency, payload )
Parameter | Type | Description |
---|---|---|
title | string | The title of the invoice. |
description | string | The description of the invoice. |
currency | string | The currency you will accept. |
payload? | string | Bot-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 ) ​
Parameter | Type | Description |
---|---|---|
label | string | |
amount | number |
Returns:
Invoice
setCurrency( currency ) ​
Parameter | Type | Description |
---|---|---|
currency | string |
Returns:
Invoice
setDescription( description ) ​
Parameter | Type | Description |
---|---|---|
description | string |
Returns:
Invoice
setDisableNotification( disableNotification ) ​
Parameter | Type | Description |
---|---|---|
disableNotification | boolean |
Returns:
Invoice
setIsFlexible( isFlexible ) ​
Parameter | Type | Description |
---|---|---|
isFlexible | boolean |
Returns:
Invoice
setMaxTipAmount( maxTipAmount ) ​
Parameter | Type | Description |
---|---|---|
maxTipAmount | number |
Returns:
Invoice
setMessageEffectId( messageEffectId ) ​
Parameter | Type | Description |
---|---|---|
messageEffectId | string |
Returns:
Invoice
setNeedEmail( needEmail ) ​
Parameter | Type | Description |
---|---|---|
needEmail | boolean |
Returns:
Invoice
setNeedName( needName ) ​
Parameter | Type | Description |
---|---|---|
needName | boolean |
Returns:
Invoice
setNeedPhoneNumber( needPhoneNumber ) ​
Parameter | Type | Description |
---|---|---|
needPhoneNumber | boolean |
Returns:
Invoice
setNeedShippingAddress( needShippingAddress ) ​
Parameter | Type | Description |
---|---|---|
needShippingAddress | boolean |
Returns:
Invoice
setPayload( payload ) ​
Parameter | Type | Description |
---|---|---|
payload | string |
Returns:
Invoice
setPhotoHeight( photoHeight ) ​
Parameter | Type | Description |
---|---|---|
photoHeight | number |
Returns:
Invoice
setPhotoSize( photoSize ) ​
Parameter | Type | Description |
---|---|---|
photoSize | number |
Returns:
Invoice
setPhotoUrl( photoUrl ) ​
Parameter | Type | Description |
---|---|---|
photoUrl | string |
Returns:
Invoice
setPhotoWidth( photoWidth ) ​
Parameter | Type | Description |
---|---|---|
photoWidth | number |
Returns:
Invoice
setProtectContent( protectContent ) ​
Parameter | Type | Description |
---|---|---|
protectContent | boolean |
Returns:
Invoice
setProviderData( providerData ) ​
Parameter | Type | Description |
---|---|---|
providerData | string |
Returns:
Invoice
setProviderToken( providerToken ) ​
Parameter | Type | Description |
---|---|---|
providerToken | string |
Returns:
Invoice
setReplyMarkup( replyMarkup ) ​
Parameter | Type | Description |
---|---|---|
replyMarkup | InlineKeyboardMarkup |
Returns:
Invoice
setReplyParameters( replyParameters ) ​
Parameter | Type | Description |
---|---|---|
replyParameters | ReplyParameters |
Returns:
Invoice
setSendEmailToProvider( sendEmailToProvider ) ​
Parameter | Type | Description |
---|---|---|
sendEmailToProvider | boolean |
Returns:
Invoice
setSendPhoneNumberToProvider( sendPhoneNumberToProvider ) ​
Parameter | Type | Description |
---|---|---|
sendPhoneNumberToProvider | boolean |
Returns:
Invoice
setStartParameter( startParameter ) ​
Parameter | Type | Description |
---|---|---|
startParameter | string |
Returns:
Invoice
setSuggestedTipAmounts( suggestedTipAmounts ) ​
Parameter | Type | Description |
---|---|---|
suggestedTipAmounts | number[] |
Returns:
Invoice
setTitle( title ) ​
Parameter | Type | Description |
---|---|---|
title | string |
Returns:
Invoice