When showing multiple pricing tiers, how to fetch and display the user's current subscription plan details in Webflow? Answered
How can I display the members current Plan?
Use to be something like data-ms-member="membership" and you used to also be able to do things like data-ms-member="membership.amount" to display the price of that plan. I actually think it was ms-member, but either way, I can’t find an attribute to display the members current plan. I’ve tried data-ms-member="plan" and “plans” and other similar things with no luck.
Comments
14 comments
You'll have to use javascript to populate it. Users can have many plans attached to them. So basically you'll have to look for them in the member object
Thankfully I had this script saved somewhere. This will look for the main plan id, and sets the text into the selector of your choice. Please read the comments so you understand how it works 🙂
Yeah, we don't have anyway to do it yet in 2.0 😞 It's on the to-do list though
Thanks a lot Raquel Lopez! 🙏
I updated the code in case you’re interested. ES6, separated functions, no jquery, etc. Oh, and you can add “Price” which is cool too. I wanted to show my members the current plan they are on, and what they’re paying for it.
Is it possible to show the plan which a user is currently subscribed to ?
(similar to showing the custom fields with data-ms-member=“first-name“)
I came up with a workaround that works.
This code fetches the current member’s subscription plan information and dynamically updates a specific HTML element (current-plan) to show the name of the active plan. It also handles cases where the member is not logged in or does not have a subscription plan. You have to place this before the closing </body> tag on the page where you want to show the current plan.
You guys are champs. I love Memberstack
Hey, is it possible to have the different plans showcased and then showing a ”your currently on this plan“ instead of the ”subscribe now“ button under a plan?
Hey Felix Gräf, if you are trying to show a pricing table and want to dynamically show the users the plan they are currently on, instead of the static pricing table which lets them buy plans, I think the simplest way is to show / hide content based on the plan they are.
So you could have two elements in each plan that you show on the front-end, one is the 'subscribe now' button and another is the 'You are currently on this plan' text. Add the data-ms-content attribute with the relevant gated content ID for the plan and you can show the elements based on their current plan.
More info on this can be found here. Hope this helps.
Once Memberstack combines data-ms-content with "Price_ID", it's solved.
That would be top on my wishlist :-)
Hi guys, I've create a screen where user can check the plan status and change the plan. I build my site on Webflow and I dont know how to pull out these information like: Subcribed Plan Name, Account status, Subscription Package, Duration, Next billing date. Please help me, thank a bunch!
Here is the wireframe for it:
Hi, I have struggled with this too and came with this solution:
Hope this helps.
Hi, Matej Svoboda thank you so much! I'll jump into find out what Webhook do 🙂
It's well described here: https://www.youtube.com/watch?v=UF9FVidUakE&t=224s
Hey Phuoc An Bui, +1 to what Matej Svoboda said.
While it is possible to launch Stripe customer portal via Memberstack attribute data-ms-action="customer-portal", it does have the Stripe's design with some customization possible in terms of features / data to show.
But if the wireframe you showed is how you want the users to view this info (i.e. within the page of your site), then storing relevant info in custom fields when there is any Stripe event might do the trick for you.
Please sign in to leave a comment.