Pricing page is now available but not fully complete. Details must be completed (Pan will write stuff out)
The buttons should link to Stripe integrations (ICEPrey currently looking at this (see Stripethread in discord).
Once Stripe integrations done
a. Remove feature flag from settings page for the "Upgrade to Pro" button, which directs to pricing page.
b. Add pricing to navbar
Here's how to manage user subscriptions and keep track of their plans:
Stripe Webhooks:
Set up Stripe webhooks to receive real-time notifications about events related to your customers' subscriptions. This is crucial for keeping your database in sync with Stripe. (we have the skeleton for this alr in the server repo's payment.py)
Event Handling: Listen for relevant events such as:
checkout.session.completed: When a customer successfully completes the checkout process.
customer.subscription.created: When a new subscription is created.
customer.subscription.updated: When a subscription is modified (e.g., plan change).
customer.subscription.deleted: When a subscription is canceled.
Database Updates: When you receive these events, update your Supabase database accordingly. You might want to add fields to your user profiles schema like:
stripe_customer_id: To link your user with their Stripe customer.
subscription_status: Active, canceled, past_due, etc.
subscription_plan: Monthly, annual, priority tier, etc.
subscription_end_date: When the current subscription period ends.
Stripe API Integration: While webhooks are great for real-time updates, you should also integrate the Stripe API for:
Retrieving subscription details when needed.
Handling edge cases or syncing data if webhooks fail.
Implementation Example: Here's a basic Flask route that could handle a Stripe webhook:
Stripe
thread in discord).More info in the google docs
Backend: how to sync Stripe with our Supabase DB
Here's how to manage user subscriptions and keep track of their plans:
Stripe Webhooks:
Set up Stripe webhooks to receive real-time notifications about events related to your customers' subscriptions. This is crucial for keeping your database in sync with Stripe. (we have the skeleton for this alr in the server repo's
payment.py
)Event Handling: Listen for relevant events such as:
Database Updates: When you receive these events, update your Supabase database accordingly. You might want to add fields to your user profiles schema like:
Implementation Example: Here's a basic Flask route that could handle a Stripe webhook: