
Now that the Customer Portal is set up and users can update or cancel their subscriptions, let’s focus on implementing the logic to reflect those changes in our system. Specifically, we’ll update the subscription record and adjust the associated account based on the new plan the customer has selected.

Learn how to handle subscription upgrades and downgrades by listening to Stripe's subscription.updated webhook and processing the payload to update both subscription and account data.
Understanding the two-step update process: first updating the subscription's product ID and billing parameters, then modifying the account's feature access to match the new plan.
How to ensure feature entitlements sync automatically with plan changes by updating account attributes like credits and feature flags when customers upgrade or downgrade.
Discover why validating database updates is critical after webhook processing, checking that product IDs, billing cycles, amounts, and account entitlements all reflect the customer's new subscription tier.
Interactive diagram used in the video
Update subscription records and accounts to reflect plan updated made on the subscription via the Customer Portal.
Continue your learning journey with these carefully curated courses
Learn how to connect your application to a Supabase database, then validate the setup by creating your first API endpoints to perform basic CRUD operations (Create, Read, Update, Delete).

Many third-party integrations rely on webhooks. Stripe is one of the most important examples, which makes it essential to understand how to implement webhooks correctly in your app and build reliable business logic on top of them.