HTTP 400 · Bad Request
HTTP 400 Payments / Stars

When & why it happens

The current account already has an active premium subscription until the supplied unix timestamp — no new purchase is needed.

Handling in gogram

Surfaced as *gogram.ErrResponseCode. Match on the message:

if err, ok := err.(*gogram.ErrResponseCode); ok { if err.Message == "PREMIUM_SUB_ACTIVE_UNTIL_X" { // handle this error } }