MadelineProtoDocs/docs/API_docs/constructors/inputStorePaymentPremiumGiftCode.md
2024-05-01 14:53:46 +02:00

2.3 KiB

title description nav_exclude image
inputStorePaymentPremiumGiftCode 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. true https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

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:

Name Type Required Description
users Array of Username, chat ID, Update, Message or InputUser Yes The users that will receive the Telegram Premium subscriptions.
boost_peer Username, chat ID, Update, Message or InputPeer Optional If 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.
currency string Yes Three-letter ISO 4217 currency code
amount long Yes 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).

Type: InputStorePaymentPurpose

Example:

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