From 1b1df0e27f2b0cf53fbe05d30d7bd656d789782d Mon Sep 17 00:00:00 2001 From: BlankParticle Date: Sat, 14 Sep 2024 12:16:27 +0530 Subject: [PATCH] fix: correct billing return url --- ee/apps/billing/trpc/routers/stripeLinksRouter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ee/apps/billing/trpc/routers/stripeLinksRouter.ts b/ee/apps/billing/trpc/routers/stripeLinksRouter.ts index f25fc6ec..8ce2b430 100644 --- a/ee/apps/billing/trpc/routers/stripeLinksRouter.ts +++ b/ee/apps/billing/trpc/routers/stripeLinksRouter.ts @@ -3,6 +3,7 @@ import { router, protectedProcedure } from '../trpc'; import { orgBilling } from '@u22n/database/schema'; import { TRPCError } from '@trpc/server'; import { eq } from '@u22n/database/orm'; +import { env } from '../../env'; import { z } from 'zod'; export const stripeLinksRouter = router({ @@ -70,7 +71,8 @@ export const stripeLinksRouter = router({ throw new Error('No stripe customer id'); const portalLink = await stripeSdk.billingPortal.sessions.create({ - customer: orgBillingQuery.stripeCustomerId + customer: orgBillingQuery.stripeCustomerId, + return_url: `${env.WEBAPP_URL}` }); return {