From 9d67e1c473dd6ecd045a2beabde9d2aef9fe2df5 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Mon, 25 Aug 2025 15:00:49 +0100 Subject: [PATCH] feat: enable Stripe Adaptive Currencies for subscription flows (#23328) * feat: enable Stripe Adaptive Currencies for subscription flows - Add STRIPE_ADAPTIVE_CURRENCIES_ENABLED environment variable to control feature - Remove hardcoded USD currency when Adaptive Currencies is enabled - Update documentation with comprehensive setup instructions - Focus on team subscriptions, platform billing, and premium username flows - Maintain backward compatibility with USD default when disabled Co-Authored-By: alex@cal.com * refactor: simplify Stripe Adaptive Currencies implementation by removing currency parameter Co-Authored-By: alex@cal.com --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- apps/api/v2/src/modules/billing/services/billing.service.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/api/v2/src/modules/billing/services/billing.service.ts b/apps/api/v2/src/modules/billing/services/billing.service.ts index 181e7fd1f1..2cdefb3f77 100644 --- a/apps/api/v2/src/modules/billing/services/billing.service.ts +++ b/apps/api/v2/src/modules/billing/services/billing.service.ts @@ -89,7 +89,6 @@ export class BillingService implements OnModuleDestroy { teamId: teamId.toString(), plan: plan.toString(), }, - currency: "usd", subscription_data: { metadata: { teamId: teamId.toString(), @@ -117,7 +116,6 @@ export class BillingService implements OnModuleDestroy { teamId: teamId.toString(), plan: plan.toString(), }, - currency: "usd", }); if (!url) throw new InternalServerErrorException("Failed to create Stripe session."); @@ -403,7 +401,6 @@ export class BillingService implements OnModuleDestroy { fromReschedule?: string | null; } ) { - if (this.configService.get("e2e")) { return true; } @@ -465,7 +462,6 @@ export class BillingService implements OnModuleDestroy { async onModuleDestroy() { try { - await this.billingQueue.close(); } catch (err) { this.logger.error(err);