MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / isOverageProvisioningAllowed

Function isOverageProvisioningAllowed

src/utils/auth.ts:1619–1639  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1617 * This mirrors the logic in apps/claude-ai `useIsOverageProvisioningAllowed` hook as closely as possible.
1618 */
1619export function isOverageProvisioningAllowed(): boolean {
1620 const accountInfo = getOauthAccountInfo()
1621 const billingType = accountInfo?.billingType
1622
1623 // Must be a Claude subscriber with a supported subscription type
1624 if (!isClaudeAISubscriber() || !billingType) {
1625 return false
1626 }
1627
1628 // only allow Stripe and mobile billing types to purchase extra usage
1629 if (
1630 billingType !== 'stripe_subscription' &&
1631 billingType !== 'stripe_subscription_contracted' &&
1632 billingType !== 'apple_subscription' &&
1633 billingType !== 'google_play_subscription'
1634 ) {
1635 return false
1636 }
1637
1638 return true
1639}
1640
1641// Returns whether the user has Opus access at all, regardless of whether they
1642// are a subscriber or PayG.

Callers 2

isExtraUsageAllowedFunction · 0.85
getWarningUpsellTextFunction · 0.85

Calls 2

getOauthAccountInfoFunction · 0.70
isClaudeAISubscriberFunction · 0.70

Tested by

no test coverage detected