Link Search Menu Expand Document

Constructor: inputStorePaymentPremiumGiftCode

Back to constructors index

Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel or to some of our contacts, see here » for more info on giveaways and gifts.

Attributes:

NameTypeRequiredDescription
usersArray of Username, chat ID, Update, Message or InputUserYesThe users that will receive the Telegram Premium subscriptions.
boost_peerUsername, chat ID, Update, Message or InputPeerOptionalIf set, the gifts will be sent on behalf of a channel we are an admin of, which will also assign some boosts to it. Otherwise, the gift will be sent directly from the currently logged in users, and we will gain some extra boost slots. See here » for more info on giveaways and gifts.
currencystringYesThree-letter ISO 4217 currency code
amountlongYesTotal 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).

Type: InputStorePaymentPurpose

Example:

$inputStorePaymentPremiumGiftCode = ['_' => 'inputStorePaymentPremiumGiftCode', 'users' => [InputUser, InputUser], 'boost_peer' => InputPeer, 'currency' => 'string', 'amount' => long];