Skip to content

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

Class: Invoice

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

This object contains basic information about an invoice.

Constructors

Constructor

new Invoice(payload): Invoice

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

Parameters

ParameterType
payloadTelegramInvoice

Returns

Invoice

Properties

PropertyTypeDefined in
payloadTelegramInvoicecontexts/index.d.ts:1633

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string


currency

Get Signature

get currency(): TelegramCurrencies

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

Three-letter ISO 4217 currency code

Returns

TelegramCurrencies


description

Get Signature

get description(): string

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

Product description

Returns

string


startParameter

Get Signature

get startParameter(): string

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

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:1638

Product name

Returns

string


totalAmount

Get Signature

get totalAmount(): number

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

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