HTTP 400 · Bad Request
PREMIUM_ACCOUNT_REQUIRED
A premium account is required to execute this action.
HTTP 400
Payments / Stars
When & why it happens
A payment, premium, or stars-purchase precondition failed. The user must complete the relevant purchase/auth flow first.
Handling in gogram
Surfaced as *gogram.ErrResponseCode. Match on the message:
if err, ok := err.(*gogram.ErrResponseCode); ok {
if err.Message == "PREMIUM_ACCOUNT_REQUIRED" {
// handle this error
}
}
Related errors
INVOICE_PAYLOAD_INVALIDThe specified invoice payload is invalid.PAYMENT_PROVIDER_INVALIDThe specified payment provider is invalid.PAYMENT_UNSUPPORTEDThis payment method is not acceptable.PREMIUM_CURRENTLY_UNAVAILABLEPremium is currently unavailable.PREMIUM_SUB_ACTIVE_UNTIL_XYou already have a premium subscription active until unixtime %v.