Skip to main content

payments.launchPrepaidGiveaway

Launch a prepaid giveaway ».

func (c *Client) PaymentsLaunchPrepaidGiveaway(ctx context.Context, request *PaymentsLaunchPrepaidGiveawayRequest) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PaymentsLaunchPrepaidGiveaway(ctx, &tg.PaymentsLaunchPrepaidGiveawayRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesThe peer where to launch the giveaway.
GiveawayIDint64yesThe prepaid giveaway ID.
PurposeInputStorePaymentPurposeClassyesGiveway parameters

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References