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

Function isOverageProvisioningAllowed

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

Source from the content-addressed store, hash-verified

1671 * This mirrors the logic in apps/claude-ai `useIsOverageProvisioningAllowed` hook as closely as possible.
1672 */
1673export function isOverageProvisioningAllowed(): boolean {
1674 const accountInfo = getOauthAccountInfo()
1675 const billingType = accountInfo?.billingType
1676
1677 // Must be a Claude subscriber with a supported subscription type
1678 if (!isClaudeAISubscriber() || !billingType) {
1679 return false
1680 }
1681
1682 // only allow Stripe and mobile billing types to purchase extra usage
1683 if (
1684 billingType !== 'stripe_subscription' &&
1685 billingType !== 'stripe_subscription_contracted' &&
1686 billingType !== 'apple_subscription' &&
1687 billingType !== 'google_play_subscription'
1688 ) {
1689 return false
1690 }
1691
1692 return true
1693}
1694
1695// Returns whether the user has Opus access at all, regardless of whether they
1696// 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