diff --git a/packages/services/api/src/modules/billing/module.graphql.ts b/packages/services/api/src/modules/billing/module.graphql.ts
index 3618c8cf8..c0e7ede3d 100644
--- a/packages/services/api/src/modules/billing/module.graphql.ts
+++ b/packages/services/api/src/modules/billing/module.graphql.ts
@@ -8,6 +8,7 @@ export default gql`
type BillingConfiguration {
hasActiveSubscription: Boolean!
+ canUpdateSubscription: Boolean!
hasPaymentIssues: Boolean!
paymentMethod: BillingPaymentMethod
billingAddress: BillingDetails
diff --git a/packages/services/api/src/modules/billing/resolvers.ts b/packages/services/api/src/modules/billing/resolvers.ts
index af4460cf1..1c2df3891 100644
--- a/packages/services/api/src/modules/billing/resolvers.ts
+++ b/packages/services/api/src/modules/billing/resolvers.ts
@@ -40,6 +40,18 @@ export const resolvers: BillingModule.Resolvers = {
Organization: {
plan: org => (org.billingPlan || 'HOBBY') as BillingPlanType,
billingConfiguration: async (org, _args, { injector }) => {
+ if (org.billingPlan === 'ENTERPRISE') {
+ return {
+ hasActiveSubscription: true,
+ canUpdateSubscription: false,
+ hasPaymentIssues: false,
+ paymentMethod: null,
+ billingAddress: null,
+ invoices: null,
+ upcomingInvoice: null,
+ };
+ }
+
const billingRecord = await injector
.get(BillingProvider)
.getOrganizationBillingParticipant({ organization: org.id });
@@ -47,6 +59,21 @@ export const resolvers: BillingModule.Resolvers = {
if (!billingRecord) {
return {
hasActiveSubscription: false,
+ canUpdateSubscription: true,
+ hasPaymentIssues: false,
+ paymentMethod: null,
+ billingAddress: null,
+ invoices: null,
+ upcomingInvoice: null,
+ };
+ }
+
+ // This is a special case where customer is on Pro and doesn't have a record for external billing.
+ // This happens when the customer is paying through an external system and not through Stripe.
+ if (org.billingPlan === 'PRO' && billingRecord.externalBillingReference === 'wire') {
+ return {
+ hasActiveSubscription: true,
+ canUpdateSubscription: false,
hasPaymentIssues: false,
paymentMethod: null,
billingAddress: null,
@@ -62,6 +89,7 @@ export const resolvers: BillingModule.Resolvers = {
if (!subscriptionInfo) {
return {
hasActiveSubscription: false,
+ canUpdateSubscription: true,
hasPaymentIssues: false,
paymentMethod: null,
billingAddress: null,
@@ -85,6 +113,7 @@ export const resolvers: BillingModule.Resolvers = {
return {
hasActiveSubscription: subscriptionInfo.subscription !== null,
+ canUpdateSubscription: subscriptionInfo.subscription !== null,
hasPaymentIssues,
paymentMethod: subscriptionInfo.paymentMethod?.card || null,
billingAddress: subscriptionInfo.paymentMethod?.billing_details || null,
diff --git a/packages/web/app/pages/[organizationId]/view/manage-subscription.tsx b/packages/web/app/pages/[organizationId]/view/manage-subscription.tsx
index a4273a838..b7fd8fcae 100644
--- a/packages/web/app/pages/[organizationId]/view/manage-subscription.tsx
+++ b/packages/web/app/pages/[organizationId]/view/manage-subscription.tsx
@@ -27,6 +27,7 @@ const ManageSubscriptionInner_OrganizationFragment = graphql(`
}
billingConfiguration {
hasPaymentIssues
+ canUpdateSubscription
paymentMethod {
__typename
}
@@ -324,7 +325,10 @@ function Inner(props: {
- Pro plan requires to defined quota of reported operations.
-
- Pick a volume a little higher than you think you'll need to avoid being rate
- limited.
-
- Don't worry, you can always adjust it later.
-
+ Pro plan requires to defined quota of reported operations.
+
+ Pick a volume a little higher than you think you'll need to avoid being rate
+ limited.
+
+ Don't worry, you can always adjust it later.
+