From 2ed7ba8808334d593dde684f4ac3235aeedfb2cd Mon Sep 17 00:00:00 2001
From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com>
Date: Mon, 10 Nov 2025 20:47:00 +0000
Subject: fix: past due pending users improvements (#572)
---
apps/web/components/views/billing.tsx | 62 +++++++++++++++++++++++--------
apps/web/components/views/profile.tsx | 69 ++++++++++++++++++++++++++---------
2 files changed, 99 insertions(+), 32 deletions(-)
(limited to 'apps')
diff --git a/apps/web/components/views/billing.tsx b/apps/web/components/views/billing.tsx
index d6d85884..f3ef2605 100644
--- a/apps/web/components/views/billing.tsx
+++ b/apps/web/components/views/billing.tsx
@@ -7,7 +7,7 @@ import {
import { Button } from "@ui/components/button"
import { HeadingH3Bold } from "@ui/text/heading/heading-h3-bold"
import { useCustomer } from "autumn-js/react"
-import { CheckCircle, LoaderIcon, X } from "lucide-react"
+import { AlertTriangle, CheckCircle, LoaderIcon, X } from "lucide-react"
import { motion } from "motion/react"
import Link from "next/link"
import { useEffect, useState } from "react"
@@ -24,11 +24,16 @@ export function BillingView() {
const {
data: status = {
- consumer_pro: null,
+ consumer_pro: { allowed: false, status: null },
},
isLoading: isCheckingStatus,
} = fetchSubscriptionStatus(autumn, !autumn.isLoading)
+ const proStatus = status.consumer_pro
+ const proProductStatus = proStatus?.status
+ const isPastDue = proProductStatus === "past_due"
+ const hasProProduct = proProductStatus !== null
+
const { data: memoriesCheck } = fetchMemoriesFeature(
autumn,
!autumn.isLoading && !isCheckingStatus,
@@ -37,7 +42,10 @@ export function BillingView() {
const memoriesUsed = memoriesCheck?.usage ?? 0
const memoriesLimit = memoriesCheck?.included_usage ?? 0
- const { data: connectionsCheck } = fetchConnectionsFeature(autumn, !autumn.isLoading && !isCheckingStatus)
+ const { data: connectionsCheck } = fetchConnectionsFeature(
+ autumn,
+ !autumn.isLoading && !isCheckingStatus,
+ )
const connectionsUsed = connectionsCheck?.usage ?? 0
@@ -66,8 +74,6 @@ export function BillingView() {
})
}
- const isPro = status.consumer_pro
-
if (user?.isAnonymous) {
return (
- You're enjoying expanded memory capacity with supermemory Pro!
+ {isPastDue
+ ? "Your payment is past due. Please update your payment method to restore access."
+ : "You're enjoying expanded memory capacity with supermemory Pro!"}
+ Payment Required
+
+ Your payment method failed or payment is past due. Update your
+ payment information to restore access to all Pro features.
+ Current Usage
- {isPro ? "Expanded memory capacity" : "Basic plan"} + {hasProProduct ? "Expanded memory capacity" : "Basic plan"}
+ Payment Required +
++ Your payment is past due. Please update your payment method to + restore access to Pro features. +
+