Scenario 1: Registered Client

Description: An already registered client (with a defined userId) subscribes to a plan. Details: A client with a free account has a ClientPlan with subscriptionPlan === "Starter" (or another free plan name) and subscriptionType === "FREE". In this case, we update the user’s ClientPlan table to assign the corresponding data at the Stripe Webhook level. The userId is passed to the subscription object metadata at the Stripe level to easily track subscriptions.

This scenario is straightforward and adopted by the majority of other boilerplates, but it has a significant drawback: requiring visitors to create a free account before paying for their subscription often results in lost potential sales due to the lengthy sign-up process.

Last updated