Skip to main content

How to hide the Cancel button in Stripe billing portal when using Memberstack integration?

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

  • Julian Galluzzo
    Julian Galluzzo

    Yup! You can do that in stripe at this page:

    https://dashboard.stripe.com/test/settings/billing/portal

    0
  • Scott Amenta
    Scott Amenta OP

    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?

    0
  • Tyler Bell
    Tyler Bell

    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.

    Also, fyi when a member cancels, we do have Stripe’s cancellation insights enabled.
     
    Not sure if that helps you out or not.
    0
  • Josh Lopez
    Josh Lopez

    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>
    0
  • Scott Amenta
    Scott Amenta OP

    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 🙂

    0
  • NAMAN PARASHAR
    NAMAN PARASHAR

    Hi Memberstack team, tried the code provided by Josh Lopez. Here are few findings which I’d like to share after adding the configuration:

    • In the first two images attached the request method is not specified (i.e. the API call is made without any method specified) but the payload contains the configuration provided here.
    • Whereas just after that request there is another request triggered automatically with correct method (i.e. POST) but without any payload (please refer to image 3 & 4)

     

     

     

    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.

    0
  • Tyler Bell
    Tyler Bell

    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.

    0
  • NAMAN PARASHAR
    NAMAN PARASHAR

    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.

    0
  • Tyler Bell
    Tyler Bell

    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.

    0
  • NAMAN PARASHAR
    NAMAN PARASHAR

    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?

    0
  • Tyler Bell
    Tyler Bell

    Yes, they key is to not have the data-ms-modal="profile" on the button anymore.

    0

Please sign in to leave a comment.

Sitemap