An invoice

Constructors

Properties

type: "invoice" = ...

Accessors

  • get amount(): Long
  • Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 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 Long

  • get currency(): string
  • Three-letter ISO 4217 currency code

    Returns string

  • get description(): string
  • Product description, 1-255 characters

    Returns string

  • get extendedMedia(): MessageMedia
  • Get the invoice's extended media. Only available if extendedMediaState is full. Otherwise, throws an error.

    Returns MessageMedia

  • get inputMedia(): TypeInputMedia
  • Input media TL object generated from this object, to be used inside InputMediaLike and TelegramClient.sendMedia.

    Invoice can't provide an input media, since some of the data is not available to the user, which is required to send it. This getter is only provided to allow using msg.media.inputMedia

    Returns TypeInputMedia

  • get photo(): null | WebDocument
  • URL of the product photo for the invoice

    Returns null | WebDocument

  • get receiptMessageId(): null | number
  • Message ID of receipt

    Returns null | number

  • get startParam(): string
  • Unique bot deep-linking parameter that can be used to generate this invoice

    Returns string

  • get title(): string
  • Product name, 1-32 characters

    Returns string

Methods

  • Whether the shipping address was requested

    Returns boolean

  • Whether this is an example (test) invoice

    Returns boolean