Hi all, does anyone know if it’s possible to remove the Cancel plan button on the Stripe customer portal page? We’d like to implement a more customized flow for cancellations so we can collect relevant information from our members.
Hi all, does anyone know if it’s possible to remove the Cancel plan button on the Stripe customer portal page? We’d like to implement a more customized flow for cancellations so we can collect relevant information from our members.
11 comments
Yup! You can do that in stripe at this page:
https://dashboard.stripe.com/test/settings/billing/portal
we have it turned off. If you go directly through the stripe billing link, it doesn’t display. However if you click through the memberstack plans > Manage Subscriptions the cancel button still appears. See two screenshots both for the same user. The URL is just slightly different. Makes me think MS might be overriding the Stripe settings?
Hey Scott, so yeah this is something that Memberstack controls regardless of your Stripe settings.
We need to add more configuration on our end to let you do this.
If you know a little javascript you may be able to use configuration options to do this. Here is the DOM Package docs. The DOM Package is included in the Webflow Package. Yor code would look similar to this:
<script> // get the button element by class const btn = document.querySelector(".button-class"); // add event listener to the button btn.addEventListener("click", function () { // launch the customer portal window.$memberstackDom.launchStripeCustomerPortal({ // add configuration options here configuration: { "subscription_cancel": { "cancellation_reason": { "enabled": false, "options": [] }, "enabled": false, }, }, }); }); </script>Thank you Josh Lopez and Tyler Bell both very helpful! NAMAN PARASHAR on my team is going to try the patch Josh shared. We’ll get back to everyone with our findings 🙂
Hi Memberstack team, tried the code provided by Josh Lopez. Here are few findings which I’d like to share after adding the configuration:
We haven’t heard back from anyone yet and we’re still experiencing the issue. I would really appreciate an update or any assistance.
Thank you for your time and attention to this matter.
NAMAN PARASHAR I’d check to make sure you don’t have the data-ms-action="customer-portal" attribute on the button.
It seems that maybe your button is firing both the memberstack portal attribute and your custom code - hence why you see two API calls.
Thanks for sharing this Tyler Bell, I’ll take a look and get back to you on the same.
We are not having data-ms-action="customer-portal" attribute instead we are using data-ms-modal="profile" to open profile.
Hi Julian Galluzzo Josh Lopez, is there a possible solution to this. Please let us know regarding the same.
Hi Naman, please make sure you don’t have data-ms-modal="profile" AND custom code triggering on the same button click.
If I understand correctly, you have custom code that is launching the portal with the configuration. If that’s the case, you’ll want to remove data-ms-modal="profile" from the button, so you’re not triggering the stripe portal twice.
Hi Tyler Bell, thanks for sharing this. Is there not a way to modify data-ms-modal="profile" ’s button (“Manage Subscription”) onClick and replace with our custom code trigger?
Yes, they key is to not have the data-ms-modal="profile" on the button anymore.
Please sign in to leave a comment.