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: [email protected] <[email protected]>

* refactor: simplify Stripe Adaptive Currencies implementation by removing currency parameter

Co-Authored-By: [email protected] <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Alex van AndelandDevin AI authored and GitHub committed 2025-08-25 14:00:49 +00:00
1 parent 489d56dad1
commit 9d67e1c473
1 file changed
-4
@@ -89,7 +89,6 @@ export class BillingService implements OnModuleDestroy {
teamId: teamId.toString(), teamId: teamId.toString(),
plan: plan.toString(), plan: plan.toString(),
}, },
currency: "usd",
subscription_data: { subscription_data: {
metadata: { metadata: {
teamId: teamId.toString(), teamId: teamId.toString(),
@@ -117,7 +116,6 @@ export class BillingService implements OnModuleDestroy {
teamId: teamId.toString(), teamId: teamId.toString(),
plan: plan.toString(), plan: plan.toString(),
}, },
currency: "usd",
}); });
if (!url) throw new InternalServerErrorException("Failed to create Stripe session."); if (!url) throw new InternalServerErrorException("Failed to create Stripe session.");
@@ -403,7 +401,6 @@ export class BillingService implements OnModuleDestroy {
fromReschedule?: string | null; fromReschedule?: string | null;
} }
) { ) {
if (this.configService.get("e2e")) { if (this.configService.get("e2e")) {
return true; return true;
} }
@@ -465,7 +462,6 @@ export class BillingService implements OnModuleDestroy {
async onModuleDestroy() { async onModuleDestroy() {
try { try {
await this.billingQueue.close(); await this.billingQueue.close();
} catch (err) { } catch (err) {
this.logger.error(err); this.logger.error(err);