Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mtkruto/tl/2_types.ts>PremiumSubscriptionOption_

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class PremiumSubscriptionOption_
import { PremiumSubscriptionOption_ } from "https://deno.land/x/mtkruto@0.1.190/tl/2_types.ts";

Describes a Telegram Premium subscription option

Constructors

new
PremiumSubscriptionOption_(params: { current?: true; can_purchase_upgrade?: true; transaction?: string; months: number; currency: string; amount: bigint; bot_url: string; store_product?: string; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
amount: bigint

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).

bot_url: string

Deep link used to initiate payment

optional
can_purchase_upgrade: true

Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to transaction, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts.

currency: string

Three-letter ISO 4217 currency code

optional
current: true

Whether this subscription option is currently in use.

months: number

Duration of subscription in months

optional
store_product: string

Store product ID, only for official apps

optional
transaction: string

Identifier of the last in-store transaction for the currently used subscription on the current account.

Static Properties

readonly
[name]: string
readonly
[paramDesc]: ParamDesc