{"record":{"id":"7cf567bbb94872e8","repo":"Significant-Gravitas/AutoGPT","slug":"tier-change-unavailable-for-your-current-billing-c","errorCode":null,"errorMessage":"Tier change unavailable for your current billing currency. Please contact support — the target tier needs to be configured for your currency in Stripe before this change can go through.","messagePattern":"Tier change unavailable for your current billing currency\\. Please contact support — the target tier needs to be configured for your currency in Stripe before this change can go through\\.","errorType":"http","errorClass":"HTTPException","httpStatus":422,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/v1.py","lineNumber":1264,"sourceCode":"                e,\n            )\n            raise HTTPException(\n                status_code=402,\n                detail=(\n                    \"No payment method on file. The plan was not changed;\"\n                    \" please add a payment method and try again.\"\n                ),\n            )\n        # Stripe rejects schedule modify when phases mix currencies, e.g. the\n        # active sub was checked out in GBP but the target tier's Price is\n        # USD-only. e.param is \"currency\" on the schedule API but may be\n        # \"phases\" or absent on older error shapes — substring fallback keeps\n        # the 422 firing instead of dropping to the generic 502.\n        if e.param == \"currency\" or \"currency\" in msg_lower:\n            logger.warning(\n                \"Currency mismatch on tier change for user %s: %s\", user_id, e\n            )\n            raise HTTPException(\n                status_code=422,\n                detail=(\n                    \"Tier change unavailable for your current billing currency.\"\n                    \" Please contact support — the target tier needs to be\"\n                    \" configured for your currency in Stripe before this\"\n                    \" change can go through.\"\n                ),\n            )\n        logger.exception(\n            \"Stripe error modifying subscription for user %s: %s\", user_id, e\n        )\n        raise HTTPException(\n            status_code=502,\n            detail=(\n                \"Unable to update your subscription right now. \"\n                \"Please try again or contact support.\"\n            ),\n        )","sourceCodeStart":1246,"sourceCodeEnd":1282,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/v1.py#L1246-L1282","documentation":"HTTP 422 raised when modifying a subscription schedule fails because phases mix currencies - e.param == 'currency' or 'currency' appears in the message. Typical case: the active subscription was checked out in a non-USD currency (e.g. GBP) but the target tier's Stripe Price is USD-only, so Stripe rejects the schedule; the substring fallback also covers older error shapes where param is 'phases' or absent.","triggerScenarios":"User whose active subscription bills in GBP/EUR requests a tier whose configured LD price exists only in USD (or vice versa); Stripe refuses to build a schedule whose phases change currency.","commonSituations":"Multi-currency rollout gaps: prices configured for some currencies only; users who originally checked out via a localized currency; a price flag pointing at the wrong currency's price ID.","solutions":["Contact support / ops to configure the target tier's price for the user's billing currency in Stripe and the flags","Alternatively cancel and re-checkout in a currency the target tier supports (changes billing immediately)","Operators: audit that every purchasable tier has prices in every currency you allow at checkout"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const status = await api.getSubscriptionStatus();\nif (status.currency && !tierSupportsCurrency(req.tier, status.currency)) warnUserBeforeSubmit();","typeGuard":null,"tryCatchPattern":"try { await api.setSubscription(req); }\ncatch (e) {\n  if (e.status === 422 && /billing currency/.test(e.detail)) showCurrencySupportNotice();\n  else throw e;\n}","preventionTips":["Surface the user's billing currency in the upgrade UI","Operators: keep per-currency price maps in sync with Stripe"],"tags":["stripe","currency","subscription","http-422"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}