diff --git a/apps/api/v2/src/modules/billing/controllers/billing.controller.ts b/apps/api/v2/src/modules/billing/controllers/billing.controller.ts index f22d9a5441..f216b41ae4 100644 --- a/apps/api/v2/src/modules/billing/controllers/billing.controller.ts +++ b/apps/api/v2/src/modules/billing/controllers/billing.controller.ts @@ -122,7 +122,7 @@ export class BillingController { await this.billingService.setSubscriptionForTeam( teamId, subscription, - PlatformPlan[plan as keyof typeof PlatformPlan] + PlatformPlan[plan.toUpperCase() as keyof typeof PlatformPlan] ); return { diff --git a/apps/api/v2/src/modules/billing/services/billing.config.service.ts b/apps/api/v2/src/modules/billing/services/billing.config.service.ts index a31d3ed261..a9a25e35b1 100644 --- a/apps/api/v2/src/modules/billing/services/billing.config.service.ts +++ b/apps/api/v2/src/modules/billing/services/billing.config.service.ts @@ -11,7 +11,7 @@ export class BillingConfigService { const planKeys = Object.keys(PlatformPlan).filter((key) => isNaN(Number(key))); for (const key of planKeys) { this.config.set( - PlatformPlan[key as keyof typeof PlatformPlan], + PlatformPlan[key.toUpperCase() as keyof typeof PlatformPlan], process.env[`STRIPE_PRICE_ID_${key}`] ?? "" ); }