summaryrefslogtreecommitdiff
path: root/Biz/PodcastItLater
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-11-12 15:15:10 -0500
committerBen Sima <ben@bsima.me>2025-11-12 15:15:10 -0500
commita56d976e3b094b22ab962205f5ae0f34e5ab5831 (patch)
treec34c11f88746a0fce0d43ec92da9d82d85b66435 /Biz/PodcastItLater
parente3be9b2fbf31d76ec65be38c484e6557a854742b (diff)
Remove personal tier, keep only free and pro
Simplified pricing to two tiers: - Free: 10 articles total (lifetime) - Pro: $29/month unlimited articles Removed STRIPE_PRICE_ID_PERSONAL from configuration.
Diffstat (limited to 'Biz/PodcastItLater')
-rw-r--r--Biz/PodcastItLater/Billing.py15
-rw-r--r--Biz/PodcastItLater/Web.nix1
-rw-r--r--Biz/PodcastItLater/Web.py10
3 files changed, 4 insertions, 22 deletions
diff --git a/Biz/PodcastItLater/Billing.py b/Biz/PodcastItLater/Billing.py
index 4cf1c0e..7daa3dc 100644
--- a/Biz/PodcastItLater/Billing.py
+++ b/Biz/PodcastItLater/Billing.py
@@ -23,12 +23,10 @@ stripe.api_key = os.getenv("STRIPE_SECRET_KEY", "")
STRIPE_WEBHOOK_SECRET = os.getenv("STRIPE_WEBHOOK_SECRET", "")
# Price IDs from Stripe dashboard
-STRIPE_PRICE_ID_PERSONAL = os.getenv("STRIPE_PRICE_ID_PERSONAL", "")
STRIPE_PRICE_ID_PRO = os.getenv("STRIPE_PRICE_ID_PRO", "")
# Map Stripe price IDs to tier names
PRICE_TO_TIER = {
- STRIPE_PRICE_ID_PERSONAL: "personal",
STRIPE_PRICE_ID_PRO: "pro",
}
@@ -38,10 +36,6 @@ TIER_LIMITS = {
"articles_per_period": 10,
"minutes_per_period": None,
},
- "personal": {
- "articles_per_period": 50,
- "minutes_per_period": None,
- },
"pro": {
"articles_per_period": None,
"minutes_per_period": None,
@@ -50,7 +44,6 @@ TIER_LIMITS = {
# Price map for checkout
PRICE_MAP = {
- "personal": STRIPE_PRICE_ID_PERSONAL,
"pro": STRIPE_PRICE_ID_PRO,
}
@@ -139,7 +132,7 @@ def create_checkout_session(user_id: int, tier: str, base_url: str) -> str:
Args:
user_id: User ID
- tier: Subscription tier (personal or pro)
+ tier: Subscription tier (pro)
base_url: Base URL for success/cancel redirects
Returns:
@@ -400,12 +393,6 @@ def get_tier_info(tier: str) -> dict[str, typing.Any]:
"price": "$0",
"description": "10 articles total",
},
- "personal": {
- "name": "Personal",
- "articles_limit": 50,
- "price": "$9/mo",
- "description": "50 articles per month",
- },
"pro": {
"name": "Pro",
"articles_limit": None,
diff --git a/Biz/PodcastItLater/Web.nix b/Biz/PodcastItLater/Web.nix
index 40bbe88..8f35dbb 100644
--- a/Biz/PodcastItLater/Web.nix
+++ b/Biz/PodcastItLater/Web.nix
@@ -44,7 +44,6 @@ in {
# SMTP_PASSWORD=your-smtp-password
# STRIPE_SECRET_KEY=sk_live_your_stripe_secret_key
# STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
- # STRIPE_PRICE_ID_PERSONAL=price_your_personal_price_id
# STRIPE_PRICE_ID_PRO=price_your_pro_price_id
test -f /run/podcastitlater/env
'';
diff --git a/Biz/PodcastItLater/Web.py b/Biz/PodcastItLater/Web.py
index 82f8a10..95f891c 100644
--- a/Biz/PodcastItLater/Web.py
+++ b/Biz/PodcastItLater/Web.py
@@ -830,10 +830,6 @@ class BillingPage(Component[AnyChildren, BillingPageAttrs]):
html.h4("Available Plans", classes=["mb-4"]),
html.div(
self._render_pricing_card("free", tier == "free"),
- self._render_pricing_card(
- "personal",
- tier == "personal",
- ),
self._render_pricing_card("pro", tier == "pro"),
classes=["row", "g-3"],
),
@@ -1560,9 +1556,9 @@ def billing_checkout(request: Request, data: FormData) -> Response:
if not user_id:
return Response("Unauthorized", status_code=401)
- tier_raw = data.get("tier", "personal")
- tier = tier_raw if isinstance(tier_raw, str) else "personal"
- if tier not in {"personal", "pro"}:
+ tier_raw = data.get("tier", "pro")
+ tier = tier_raw if isinstance(tier_raw, str) else "pro"
+ if tier != "pro":
return Response("Invalid tier", status_code=400)
try: