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 <me@alexvanandel.com>

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

Co-Authored-By: alex@cal.com <me@alexvanandel.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Alex van Andel
2025-08-25 14:00:49 +00:00
committed by GitHub
co-authored by Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 489d56dad1
commit 9d67e1c473
@@ -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);