MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isOverageProvisioningAllowed

Function isOverageProvisioningAllowed

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

Source from the content-addressed store, hash-verified

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