Skip to main content

payments.checkGiftCode

Obtain information about a Telegram Premium giftcode »

func (c *Client) PaymentsCheckGiftCode(ctx context.Context, slug string) (*PaymentsCheckedGiftCode, error)

Calling this method

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

res, err := api.PaymentsCheckGiftCode(ctx, slug)
if err != nil {
return err
}
_ = res // *PaymentsCheckedGiftCode
return nil
})

Parameters

NameTypeRequiredDescription
SlugstringyesThe giftcode to check

Returns

*PaymentsCheckedGiftCode

Possible errors

CodeTypeDescription
400GIFT_SLUG_EXPIREDThe specified gift slug has expired.
400GIFT_SLUG_INVALIDThe specified slug is invalid.

References