Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

minor fix

daniel31x139ed374c4c34b
diff --git a/apps/web/lib/api/paymentCheckout.ts b/apps/web/lib/api/paymentCheckout.ts
index 414f88f2..d4aafcf9 100644
--- a/apps/web/lib/api/paymentCheckout.ts
+++ b/apps/web/lib/api/paymentCheckout.ts
@@ -44,14 +44,22 @@ export default async function paymentCheckout(email: string, priceId: string) {
customer_email: isExistingCustomer ? undefined : email.toLowerCase(),
success_url: `${process.env.BASE_URL}/dashboard`,
cancel_url: `${process.env.BASE_URL}/login`,
- automatic_tax: {
- enabled: true,
- },
subscription_data: {
trial_period_days: NEXT_PUBLIC_TRIAL_PERIOD_DAYS
? Number(NEXT_PUBLIC_TRIAL_PERIOD_DAYS)
: 14,
},
+ ...(process.env.MANAGED_PAYMENTS_ENABLED === "true"
+ ? {
+ managed_payments: {
+ enabled: true,
+ },
+ }
+ : {
+ automatic_tax: {
+ enabled: true,
+ },
+ }),
});
return { response: session.url, status: 200 };
diff --git a/apps/web/lib/api/stripe/stripeSDK.ts b/apps/web/lib/api/stripe/stripeSDK.ts
index 05f2a4bc..a7d6dff5 100644
--- a/apps/web/lib/api/stripe/stripeSDK.ts
+++ b/apps/web/lib/api/stripe/stripeSDK.ts
@@ -8,7 +8,8 @@ export default function stripeSDK() {
}
const stripe = new Stripe(secretKey, {
- apiVersion: "2025-07-30.basil",
+ // @ts-ignore
+ apiVersion: process.env.STRIPE_API_VERSION || "2025-07-30.basil",
});
return stripe;