Skip to content

Commit

Permalink
fix: correct billing return url (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlankParticle authored Sep 14, 2024
1 parent 55fd7b8 commit f7d4c48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ee/apps/billing/trpc/routers/stripeLinksRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f7d4c48

Please sign in to comment.