Plan Management
This guide covers everything you need to know about implementing and managing membership plans with Memberstack. All paid plans are processed through Stripe, ensuring secure and reliable payments.
Before You Start
Create and configure your plans in the Memberstack dashboard under "Plans" before implementing them in your code. Important:
- Free plans use Plan IDs (starts with "plan_")
- Paid plans use Price IDs (starts with "price_")
- Connect your Stripe account for paid plans
- Create plans in the dashboard (Plans → New Plan)
Testing Your Plans
To test your plans without real charges:
- Enable test mode in your Memberstack DevTools, then copy your public key (it starts with "pk_sb_").
- Test mode has its own set of Plan IDs and Price IDs - make sure to use the correct ones
- Use Stripe's test card: 4242 4242 4242 4242 (exp: any future date, CVC: any 3 digits)
- Remember to switch back to live mode and update IDs for production
Free Plans
Free plans are a great way to offer basic access to your platform or provide a trial experience. They can be implemented without Stripe integration.
Fetching Available Plans
First, let's see how to retrieve all available plans:
Adding a Free Plan
Here's how to create a free plan signup button and handle enrollment:
Free Plan Tips
- Make sure to clearly list what's included in the free plan
- Consider adding a trial of paid features to free plans
- Show comparison tables to encourage upgrades
- Test the signup flow both logged in and logged out
Paid Plans
Paid plans use Stripe for secure payment processing. Before implementing paid plans, make sure you've connected Stripe in your Memberstack dashboard and created your plans.
You can read more about the Stripe Customer Portal configuration here.
Adding a Paid Plan
Here's how to create a paid plan button and handle Stripe checkout:
Required Setup
- Connected Stripe account
- Plans created in dashboard
- Test mode for development
- Plan IDs copied and ready
Plan Settings
- Set prices and billing cycles
- Define included features
- Configure trial periods
- Set member limits if needed
Plan Purchase Flow
Here's how to handle common plan management tasks like checking access, upgrades, and letting members manage their subscriptions:
Common Questions
What's the difference between Plan IDs and Price IDs?
Free plans use Plan IDs (starts with "plan_") while paid plans use Price IDs (starts with "price_"). You can find both in your Memberstack dashboard under the respective plan settings.
Where do I find my plan/price IDs?
In your Memberstack dashboard: Plans → click on a plan → find the Plan ID for free plans or Price ID for paid plans in the settings
Where do I find my plan IDs?
In your Memberstack dashboard: Plans → click on a plan → copy the ID from the URL or settings
How do members change plans?
Use memberstack.launchStripeCustomerPortal() to let them manage their subscription
Can I offer a trial period?
Yes! Configure trial periods in your Memberstack dashboard when creating plans
Next Steps
Now that you've set up plan management, you might want to explore:
Need Help?
Having trouble getting your login working? We're here to help!