Fixes customer portal return url (#802)

This commit is contained in:
Omar López authored and GitHub committed 2021-09-28 09:04:30 +01:00
1 parent dcea723ea4
commit f23e4f2b9d
4 files changed
+30 -2

No files matched your search

@@ -48,7 +48,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
message: "Stripe customer id not found",
});
const return_url = `${process.env.NEXT_PUBLIC_APP_URL}/settings/billing`;
const return_url = `${process.env.BASE_URL}/settings/billing`;
const stripeSession = await stripe.billingPortal.sessions.create({
customer: customer.id,
return_url,