diff --git a/packages/web/src/app/redeem/page.tsx b/packages/web/src/app/redeem/page.tsx index d79a5747..ac6214b3 100644 --- a/packages/web/src/app/redeem/page.tsx +++ b/packages/web/src/app/redeem/page.tsx @@ -6,6 +6,8 @@ import { AcceptInviteButton } from "./components/acceptInviteButton" import Image from "next/image"; import logoDark from "@/public/sb_logo_dark_large.png"; import logoLight from "@/public/sb_logo_light_large.png"; +import { fetchSubscription } from "@/actions"; +import { isServiceError } from "@/lib/utils"; interface RedeemPageProps { searchParams?: { @@ -108,6 +110,34 @@ export default async function RedeemPage({ searchParams }: RedeemPageProps) { ) } + const stripeCustomerId = org.stripeCustomerId; + if (stripeCustomerId) { + const subscription = await fetchSubscription(org.domain); + if (isServiceError(subscription)) { + return ( +