diff --git a/packages/app-store/stripepayment/api/portal.ts b/packages/app-store/stripepayment/api/portal.ts index 7087c5304f..f04d3b4be8 100644 --- a/packages/app-store/stripepayment/api/portal.ts +++ b/packages/app-store/stripepayment/api/portal.ts @@ -4,7 +4,7 @@ import { getStripeCustomerIdFromUserId } from "../lib/customer"; import stripe from "../lib/server"; export default async function handler(req: NextApiRequest, res: NextApiResponse) { - if (req.method === "POST") { + if (req.method === "POST" || req.method === "GET") { const customerId = await getStripeCustomerIdFromUserId(req.session!.user.id); if (!customerId) { diff --git a/packages/ui/v2/core/layouts/SettingsLayout.tsx b/packages/ui/v2/core/layouts/SettingsLayout.tsx index 01b01cd5b0..5a2eac445a 100644 --- a/packages/ui/v2/core/layouts/SettingsLayout.tsx +++ b/packages/ui/v2/core/layouts/SettingsLayout.tsx @@ -48,8 +48,7 @@ const tabs: VerticalTabItemProps[] = [ href: "/settings/billing", icon: Icon.FiCreditCard, children: [ - // - { name: "invoices", href: "/settings/billing" }, + { name: "Manage Billing", href: "/api/integrations/stripepayment/portal", isExternalLink: true }, ], }, { @@ -143,6 +142,7 @@ const SettingsSidebarContainer = ({ className = "" }) => { , "href">; }; @@ -43,6 +44,7 @@ const VerticalTabItem = function ({ <> )}
- {t(name)} + + {t(name)} + {props.isExternalLink ? : null} + {info && ( {t(info)}