From 11119adfa562bf87d03f95a90f43d67da675dbd4 Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 10 Feb 2026 21:08:11 -0800 Subject: [PATCH] Allow cupons --- server/private/routers/billing/createCheckoutSession.ts | 1 + .../routers/generatedLicense/generateNewEnterpriseLicense.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/server/private/routers/billing/createCheckoutSession.ts b/server/private/routers/billing/createCheckoutSession.ts index dc722519..e5bb95db 100644 --- a/server/private/routers/billing/createCheckoutSession.ts +++ b/server/private/routers/billing/createCheckoutSession.ts @@ -105,6 +105,7 @@ export async function createCheckoutSession( line_items: lineItems, customer: customer.customerId, mode: "subscription", + allow_promotion_codes: true, success_url: `${config.getRawConfig().app.dashboard_url}/${orgId}/settings/billing?success=true&session_id={CHECKOUT_SESSION_ID}`, cancel_url: `${config.getRawConfig().app.dashboard_url}/${orgId}/settings/billing?canceled=true` }); diff --git a/server/private/routers/generatedLicense/generateNewEnterpriseLicense.ts b/server/private/routers/generatedLicense/generateNewEnterpriseLicense.ts index 7cffb9d7..fc9978b4 100644 --- a/server/private/routers/generatedLicense/generateNewEnterpriseLicense.ts +++ b/server/private/routers/generatedLicense/generateNewEnterpriseLicense.ts @@ -126,6 +126,7 @@ export async function generateNewEnterpriseLicense( ], // Start with the standard feature set that matches the free limits customer: customer.customerId, mode: "subscription", + allow_promotion_codes: true, success_url: `${config.getRawConfig().app.dashboard_url}/${orgId}/settings/license?success=true&session_id={CHECKOUT_SESSION_ID}`, cancel_url: `${config.getRawConfig().app.dashboard_url}/${orgId}/settings/license?canceled=true` });