Skip to content

GramIO API Reference / @gramio/contexts/dist / Invoice

Class: Invoice ​

Defined in: contexts/index.d.ts:1998

This object contains basic information about an invoice.

Constructors ​

Constructor ​

new Invoice(payload): Invoice

Defined in: contexts/index.d.ts:2000

Parameters ​

ParameterType
payloadTelegramInvoice

Returns ​

Invoice

Properties ​

PropertyTypeDefined in
payloadTelegramInvoicecontexts/index.d.ts:1999

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

Defined in: contexts/index.d.ts:2002

MDN

Returns ​

string


currency ​

Get Signature ​

get currency(): TelegramCurrencies

Defined in: contexts/index.d.ts:2013

Three-letter ISO 4217 currency code

Returns ​

TelegramCurrencies


description ​

Get Signature ​

get description(): string

Defined in: contexts/index.d.ts:2006

Product description

Returns ​

string


startParameter ​

Get Signature ​

get startParameter(): string

Defined in: contexts/index.d.ts:2011

Unique bot deep-linking parameter that can be used to generate this invoice

Returns ​

string


title ​

Get Signature ​

get title(): string

Defined in: contexts/index.d.ts:2004

Product name

Returns ​

string


totalAmount ​

Get Signature ​

get totalAmount(): number

Defined in: contexts/index.d.ts:2022

Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

Returns ​

number