Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💸 Allow promo codes on checkout page

Luke Vellaeb625b946fba
diff --git a/apps/web/src/app/api/stripe/buy-license/route.ts b/apps/web/src/app/api/stripe/buy-license/route.ts
index e910bde92..d080646f8 100644
--- a/apps/web/src/app/api/stripe/buy-license/route.ts
+++ b/apps/web/src/app/api/stripe/buy-license/route.ts
@@ -72,7 +72,9 @@ export async function GET(request: NextRequest) {
],
mode: "payment",
success_url: "https://rallly.co/licensing/thank-you",
- ...(promoCodeId ? { discounts: [{ promotion_code: promoCodeId }] } : {}),
+ ...(promoCodeId
+ ? { discounts: [{ promotion_code: promoCodeId }] }
+ : { allow_promotion_codes: true }),
metadata: {
licenseType: type,
version: 4,