Link Search Menu Expand Document

Constructor: inputStorePaymentPremiumGiveaway

Back to constructors index

Used to pay for a giveaway, see here » for more info.

Attributes:

NameTypeRequiredDescription
only_new_subscribersBoolOptionalIf set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.
winners_are_visibleBoolOptionalIf set, giveaway winners are public and will be listed in a messageMediaGiveawayResults message that will be automatically sent to the channel once the giveaway ends.
boost_peerUsername, chat ID, Update, Message or InputPeerOptionalThe channel starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways.
additional_peersArray of Username, chat ID, Update, Message or InputPeerOptionalAdditional channels that the user must join to participate to the giveaway can be specified here.
countries_iso2Array of stringOptionalThe set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes.
prize_descriptionstringOptionalCan contain a textual description of additional giveaway prizes.
until_dateintYesThe end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways.
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:

$inputStorePaymentPremiumGiveaway = ['_' => 'inputStorePaymentPremiumGiveaway', 'only_new_subscribers' => Bool, 'winners_are_visible' => Bool, 'boost_peer' => InputPeer, 'additional_peers' => [InputPeer, InputPeer], 'countries_iso2' => ['string', 'string'], 'prize_description' => 'string', 'until_date' => int, 'currency' => 'string', 'amount' => long];