diff --git a/web/app/(app)/dashboard/(components)/account-settings.tsx b/web/app/(app)/dashboard/(components)/account-settings.tsx
index bad9404..5f72afa 100644
--- a/web/app/(app)/dashboard/(components)/account-settings.tsx
+++ b/web/app/(app)/dashboard/(components)/account-settings.tsx
@@ -43,6 +43,7 @@ import { Textarea } from '@/components/ui/textarea'
import axios from 'axios'
import { useSession } from 'next-auth/react'
import { Routes } from '@/config/routes'
+import { polarCustomerPortalRequestUrl } from '@/config/external-links'
import {
Tooltip,
TooltipContent,
@@ -448,7 +449,7 @@ export default function AccountSettings() {
) : (
Manage Subscription →
diff --git a/web/app/(app)/dashboard/(components)/subscription-info.tsx b/web/app/(app)/dashboard/(components)/subscription-info.tsx
index 3eeb7ae..804c58b 100644
--- a/web/app/(app)/dashboard/(components)/subscription-info.tsx
+++ b/web/app/(app)/dashboard/(components)/subscription-info.tsx
@@ -6,6 +6,7 @@ import { Spinner } from '@/components/ui/spinner'
import { useQuery } from '@tanstack/react-query'
import httpBrowserClient from '@/lib/httpBrowserClient'
import { ApiEndpoints } from '@/config/api'
+import { polarCustomerPortalRequestUrl } from '@/config/external-links'
import Link from 'next/link'
import {
Tooltip,
@@ -27,6 +28,14 @@ export default function SubscriptionInfo() {
.then((res) => res.data),
})
+ const { data: currentUser } = useQuery({
+ queryKey: ['currentUser'],
+ queryFn: () =>
+ httpBrowserClient
+ .get(ApiEndpoints.auth.whoAmI())
+ .then((res) => res.data?.data),
+ })
+
// Format price with currency symbol
const formatPrice = (
amount: number | null | undefined,
@@ -254,7 +263,7 @@ export default function SubscriptionInfo() {
) : (
Manage Subscription →
diff --git a/web/config/external-links.ts b/web/config/external-links.ts
index 1df952f..5f9a06c 100644
--- a/web/config/external-links.ts
+++ b/web/config/external-links.ts
@@ -1,3 +1,14 @@
+const POLAR_CUSTOMER_PORTAL_REQUEST_BASE =
+ 'https://polar.sh/textbee/portal/request'
+
+export function polarCustomerPortalRequestUrl(
+ email?: string | null
+): string {
+ const trimmed = email?.trim()
+ if (!trimmed) return POLAR_CUSTOMER_PORTAL_REQUEST_BASE
+ return `${POLAR_CUSTOMER_PORTAL_REQUEST_BASE}?email=${encodeURIComponent(trimmed)}`
+}
+
export const ExternalLinks = {
patreon: 'https://patreon.com/vernu',
github: 'https://github.com/vernu/textbee',