Significant-Gravitas/AutoGPT · warning · HTTPException
Subscription not available for tier {tier.value}
Error message
Subscription not available for tier {tier.value} What it means
HTTP 422 from POST /credits/subscription when the ENABLE_PLATFORM_PAYMENT LaunchDarkly feature flag is off for the user. Without payments enabled, no paid tier can be provisioned, so any request targeting a paid tier is rejected. This mirrors the GET endpoint hiding paid tiers when payments are disabled.
Source
Thrown at autogpt_platform/backend/backend/api/features/v1.py:1168
e,
)
raise HTTPException(
status_code=502,
detail=(
"Unable to cancel your subscription right now. "
"Please try again or contact support."
),
)
if not had_subscription:
# No Stripe subscription drove this change (admin-granted or
# never-paid).
await set_subscription_tier(user_id, tier)
return await get_subscription_status(user_id)
await set_subscription_tier(user_id, tier)
return await get_subscription_status(user_id)
if not payment_enabled:
raise HTTPException(
status_code=422,
detail=f"Subscription not available for tier {tier.value}",
)
# Target has no LD price — not provisionable (matches the GET hiding).
if target_price_id is None:
raise HTTPException(
status_code=422,
detail=f"Subscription not available for tier {tier.value}",
)
# Modify in place if there's a sub; else fall through to Checkout below.
try:
modified = await modify_stripe_subscription_for_tier(
user_id, tier, request.billing_cycle
)
if modified:
return await get_subscription_status(user_id)View on GitHub (pinned to 9c8bb5550f)
Solutions
- Enable ENABLE_PLATFORM_PAYMENT for the user/environment in LaunchDarkly (or set the default true)
- Verify the LD SDK is initialized and the SDK key is correct on the backend
- Self-hosted without Stripe: do not offer paid tiers; provision tiers via admin tooling instead
Defensive patterns
Strategy: validation
Validate before calling
const status = await api.getSubscriptionStatus();
if (!status.paymentEnabled) throw new Error("Payments not available in this environment"); Try / catch
try { await api.setSubscription(paidReq); }
catch (e) { if (e.status === 422 && /not available/.test(e.detail)) hideUpgradeUI(); else throw e; } Prevention
- Check subscription status/GET before showing upgrade buttons
- Operators: verify ENABLE_PLATFORM_PAYMENT flag targeting
- Self-hosted: expect payments disabled by default
When it happens
Trigger: POST /credits/subscription with tier in {PRO, MAX, BUSINESS} while the LD flag ENABLE_PLATFORM_PAYMENT evaluates false for that user (flag off globally, or user not in the targeting).
Common situations: Self-hosted deployments without Stripe configured (flag intentionally off); LaunchDarkly SDK not initialized or offline so flags fall back to defaults; staging environments where payments are disabled; a specific user excluded from the flag rollout.
Related errors
- Tier change unavailable for your current billing currency. P
- success_url and cancel_url are required for paid tier upgrad
- Transcription failed
- Page must be greater than 0
- Page size must be greater than 0
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/9cf23d3cc76c86ba.
Report an issue: GitHub.