diff --git a/backend/utils/config.py b/backend/utils/config.py index 5af6f98b..463d65ca 100644 --- a/backend/utils/config.py +++ b/backend/utils/config.py @@ -88,12 +88,20 @@ class Configuration: STRIPE_TIER_25_170_YEARLY_COMMITMENT_ID_STAGING: str = 'price_1RqYHbG6l1KZGqIrAUVf8KpG' # $170/month # Credit package price IDs - Production - STRIPE_CREDITS_10_PRICE_ID_PROD: str = 'price_1RxXOvG6l1KZGqIrMqsiYQvk' - STRIPE_CREDITS_25_PRICE_ID_PROD: str = 'price_1RxXPNG6l1KZGqIrQprPgDme' + STRIPE_CREDITS_10_PRICE_ID_PROD: str = 'price_1RxmQUG6l1KZGqIru453O1zW' + STRIPE_CREDITS_25_PRICE_ID_PROD: str = 'price_1RxmQlG6l1KZGqIr3hS5WtGg' + STRIPE_CREDITS_50_PRICE_ID_PROD: str = 'price_1RxmQvG6l1KZGqIrLbMZ3D6r' + STRIPE_CREDITS_100_PRICE_ID_PROD: str = 'price_1RxmR3G6l1KZGqIrpLwFCGac' + STRIPE_CREDITS_250_PRICE_ID_PROD: str = 'price_1RxmRAG6l1KZGqIrtBIMsZAj' + STRIPE_CREDITS_500_PRICE_ID_PROD: str = 'price_1RxmRGG6l1KZGqIrSyvl6w1G' # Credit package price IDs - Staging STRIPE_CREDITS_10_PRICE_ID_STAGING: str = 'price_1RxXOvG6l1KZGqIrMqsiYQvk' STRIPE_CREDITS_25_PRICE_ID_STAGING: str = 'price_1RxXPNG6l1KZGqIrQprPgDme' + STRIPE_CREDITS_50_PRICE_ID_STAGING: str = 'price_1RxmNhG6l1KZGqIrTq2zPtgi' + STRIPE_CREDITS_100_PRICE_ID_STAGING: str = 'price_1RxmNwG6l1KZGqIrnliwPDM6' + STRIPE_CREDITS_250_PRICE_ID_STAGING: str = 'price_1RxmO6G6l1KZGqIrBF8Kx87G' + STRIPE_CREDITS_500_PRICE_ID_STAGING: str = 'price_1RxmOFG6l1KZGqIrn4wgORnH' # Computed subscription tier IDs based on environment @property diff --git a/frontend/src/components/billing/credit-purchase.tsx b/frontend/src/components/billing/credit-purchase.tsx index 1a3aac22..dfa37e2b 100644 --- a/frontend/src/components/billing/credit-purchase.tsx +++ b/frontend/src/components/billing/credit-purchase.tsx @@ -10,12 +10,10 @@ import { } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'; import { Label } from '@/components/ui/label'; -import { Input } from '@/components/ui/input'; import { Alert, AlertDescription } from '@/components/ui/alert'; import { Badge } from '@/components/ui/badge'; -import { Loader2, CreditCard, AlertCircle, CheckCircle, Zap } from 'lucide-react'; +import { Loader2, CreditCard, AlertCircle, Zap, AlertCircleIcon } from 'lucide-react'; import { apiClient, backendApi } from '@/lib/api-client'; import { toast } from 'sonner'; @@ -35,12 +33,11 @@ interface CreditPackage { const CREDIT_PACKAGES: CreditPackage[] = [ { amount: 10, price: 10 }, - { amount: 25, price: 25, popular: true }, - // Uncomment these when you create the additional price IDs in Stripe: - // { amount: 50, price: 50 }, - // { amount: 100, price: 100 }, - // { amount: 250, price: 250 }, - // { amount: 500, price: 500 }, + { amount: 25, price: 25 }, + { amount: 50, price: 50 }, + { amount: 100, price: 100, popular: true }, + { amount: 250, price: 250 }, + { amount: 500, price: 500 }, ]; export function CreditPurchaseModal({ @@ -148,9 +145,9 @@ export function CreditPurchaseModal({ {currentBalance > 0 && ( - - - + + + Current balance: ${currentBalance.toFixed(2)} @@ -183,60 +180,12 @@ export function CreditPurchaseModal({ ))} -
- -
-
- - $ - - handleCustomAmountChange(e.target.value)} - className="pl-7" - /> -
-
-

- Minimum: $10 • Maximum: $5,000 -

-
{error && ( {error} )} - {(selectedPackage || customAmount) && ( - - - Purchase Summary - - -
- Amount: - - ${selectedPackage ? selectedPackage.amount.toFixed(2) : parseFloat(customAmount).toFixed(2)} - -
-
- Payment method: - - - Card - -
-
-
- )}