Skip to content

Commit f7d4c48

Browse files
fix: correct billing return url (#778)
1 parent 55fd7b8 commit f7d4c48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ee/apps/billing/trpc/routers/stripeLinksRouter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { router, protectedProcedure } from '../trpc';
33
import { orgBilling } from '@u22n/database/schema';
44
import { TRPCError } from '@trpc/server';
55
import { eq } from '@u22n/database/orm';
6+
import { env } from '../../env';
67
import { z } from 'zod';
78

89
export const stripeLinksRouter = router({
@@ -70,7 +71,8 @@ export const stripeLinksRouter = router({
7071
throw new Error('No stripe customer id');
7172

7273
const portalLink = await stripeSdk.billingPortal.sessions.create({
73-
customer: orgBillingQuery.stripeCustomerId
74+
customer: orgBillingQuery.stripeCustomerId,
75+
return_url: `${env.WEBAPP_URL}`
7476
});
7577

7678
return {

0 commit comments

Comments
 (0)