Comment on page
Free Accounts
You can offer a free plan to your users' simply by adding a new plan object inside
stripe.plans
in your config file. You can name the plan whatever you like, but the id must be set to
free
{
"id": "free",
"name": "Hobby",
"price": 0,
"interval": 'month',
"currency": { "name": "usd", "symbol": "$" }
}
This will bypass the payment and create a user on a free plan. You can then restrict features in your app, if required, based on the user's plan.
Users on the free plan can upgrade to a paid plan in
account/billing
If a user is on the free plan and selects a paid plan, the server will return a 402 Payment Required
response, which will redirect the user to a payment form.You can return a 402 status anywhere in your application to force the user to upgrade to a paid plan.
Once the payment has been processed, a new Stripe customer and subscription is created for the user.
If a user downgrades from a paid to free plan in the billing view. Their Stripe subscription will automatically be cancelled.
When either upgrading or downgrading, the user's plan will be updated in client context so they can immediately access (or not) the features for that plan on the front end.
Last modified 2mo ago