Let’s say you’re selling your membership through one of the most popular third-party funnel building apps, ClickFunnels.
What happens when your users want to upgrade from a lower tier to a higher tier of your membership (or vice versa)…?
In ClickFunnels this can’t be done “out of the box” because ClickFunnels sells your offers as products, not as memberships.
Even if you’re using our ClickFunnels MemberPress Integration all of payment handling still happens on the ClickFunnels side.
One of our customers wanted the ability to offer her members upgrades and downgrades without having to switch away from ClickFunnels.
So we came up with a solution which involves Zapier, Stripe and a custom script.
Which also works for downgrading or changing the membership to another one. In essence what the script does is to cancel a Stripe subscription.
After a 5 minute setup, everything will happen automatically and your user’s lower-tier subscription will be canceled as soon as they sign up for the higher tier one or vice versa.
Requirements for this tutorial
In order to perform automatic upgrades or downgrades of subscriptions with ClickFunnels and Stripe using our custom script, you’ll need the following items:
1 – ClickFunnels – This is a page builder and funnel builder that many of our customers use extensively, particularly for its excellent marketing features.
2 – Stripe – You’ll need to have an account with this popular payment processor as well.
3 – Zapier – You’ll need a paid Zapier account. The free version of Zapier doesn’t allow for multi-step zaps, which you’ll need to get this working.
4 – Our ClickFunnels Subscription Upgrade script – This is the key to the puzzle! This custom script automatically performs the actual upgrade (or downgrade) in real time, creating a smooth experience for your members and less headaches and support for you.
How does the ClickFunnels subscription upgrade with Stripe work?
Setting up Zapier
First, you need to set up a custom webhook that will be sent when somebody buys an
You use Zapier for this.
Here are the steps you need to follow:
1 – Create a new zap and set ClickFunnels as the trigger application.
Set the event as “New Successful Purchase“.
After that, you have to connect your account.
Simply follow the steps on the screen and they will guide you through connecting Zapier to ClickFunnels via API).
2 – Pick the funnel and the funnel step where your member makes the upgrade purchase.
3 – Create a new action step in your Zap and select “Webhooks by Zapier“.
The action event should be set to “POST“
4 – Configure the POST request per the screenshots (click to zoom in) and text instructions below.
The options that we have to edit here are:
URL – https://sorinmarta.com/memberfix/blurred/t-request.php
Note: You can upload our custom script anywhere you can run PHP scripts, e.g. your WordPress site (via FTP), on a DigitalOcean LAMP droplet, etc. You can also rename it to whatever you want.
But wherever you put it, you have to make sure to get the exact path of the file after you upload it and paste the path into this step of the zap.
Please see “The Upload” step for upload instructions.
Payload Type – Form
This means that Zapier will send your data as form-data, thus simulating a form submission.
Data – User_Email -> ClickFunnels Contact Email
Headers – Source -> MemberFix-ClickFunnels
This a security header. It makes sure that Zapier only process the requests that come from your Zap.
Copy and Paste it exactly as it’s written below because it’s case sensitive:
Getting the API Key from Stripe
In Stripe you need to get your API key that you need to add to the script.
1 – After logging into Stripe you have to click “Developers” in the sidebar menu.
2 – In the menu that opens click “API keys”.
3 – Here you should be able to see your “Publishable key” and “Secret key”. You need to copy the “Secret key” and use it in the next step.
Configuring The ClickFunnels / Stripe Upgrade Script
After checkout you’ll get a .zip file.
Once you unzip it you’ll see there is a file there called “t-request.php”.
You’ll need to edit this file. It’s super easy…don’t worry. 🙂
Note: I recommend you download the Sublime Text editor because it’s really fast and easy to use…
in that file at lines 2 and 3 you will see the following:
$api_key = 'HERE YOU ADD YOUR API KEY'; $sub_default_name = 'HERE YOU ADD YOUR STRIPE PRODUCT NICKNAME';
1 – Change the value of “$api_key” to your secret key that you copied in the previous step.
(Don’t delete the single quotes or the semicolon.)
2 – Next change the value of “$sub_default_name” to your original ClickFunnels product name
After you’ve completed these steps, lines 2 and 3 of the script will look something like this:
$api_key = 'YourStripeAPIKeyGoesHere'; $sub_default_name = 'My Awesome Membership Product - Yearly Plan';
1 – Now all you need to do is to upload all the files you received in the archive to your website. Including the “t-request.php” and the “stripe-php” folder.
You can do that using FTP, cPanel, etc.
Here are 2 articles about how to upload files through FTP or cPanel.
2 – The link to your “t-request.php” file (which is the script URL that we put in the Zap) depends on where you upload the files.
For example, if you upload it to a new folder in “public_html” called “
You will need to use this link in the first Zap that we built.
Why did we develop the ClickFunnels subscription upgrade script for Stripe?
One of our clients needed a solution for the ClickFunnels upgrade issue.
So I did a lot of research on the subject to see if there is already a solution for that but I couldn’t find anything about that.
So I started working on this custom solution. 🙂
Will you provide support for this script?
Please note that we provide support for this script exclusively in the comments section of this post.
So if you have any questions or issues please come back to this post and leave a comment describing them (you can also upload screenshots in the comments).
We will provide email support at email@example.com but using comments instead, everybody benefits from the conversation and explanations, including existing and potential customers. 🙂
It also fosters transparency which improves the direction of development by involving our entire community.
To use this script you need to have the following:
1 – Zapier (paid account)
2 – ClickFunnels
3 – Stripe
|Last Updated||Sep 21, 2019|
How can I download the ClickFunnels subscription upgrade with Stripe script?
We offer this script for sale starting at $15. If you’d like to purchase it please complete the checkout below.
You’ll gain access after checkout.
After that, you have to follow our usage instructions and you are all set. It should work by itself from now on.
All done! ?
1.0.0 – September 21, 2019
- Initial release
How do you rate this script? 14.97-179.97
Name: ClickFunnels subscription upgrade with Stripe
Description: Automate your upgrading of Clickfunnels users from a lower-tier subscription to a higher one when using Stripe.
Offer price: 14.97-179.97
Application Category: Script
Need help with this script? Want us to install it for you? Leave your questions, comments and support requests below! 🙂
Hey guys, I just bought your script and configured everything. My question is… how do I set the original subscription to be cancelled? I see where to enter the new subscription, but can’t seem to figure out how to tell the script to cancel the original subscription.
Hi Rob, Sorry for the confusion, in Zapier you select the new subscription, the higher tier in our example. And in the script you put the old subscription. So the original one (lower tier in our example) goes into the script and the new one goes into Zapier. So the flow will be like this: ClickFunnels sends a signal to Zapier when the new subscription is bought -> Zapier sends a signal to our script -> The script sends a signal to Stripe -> Stripe is canceling the old subscription Please let me know if that answers your question or… Read more »
Got it… makes sense. Thanks for the reply!
Hey guys, purchased the script, but the original subscription is not being cancelled inside of Stripe. We’ve set the original subscription inside of the script, and the new subscription inside of Zapier so it is seemlingly set up correctly, however it’s not cancelling the original subscription when our customers upgrade.
Any assistance would be helpful. Thanks.
Thanks for your purchase!
I need a bit more details to be able to investigate this issue. I sent you an email with what I need.
Hi guys. After trying several times I can’t seem to get this working. Stripe isn’t cancelling the old membership. How can I get some assistance? Thanks!
Any ideas? How do I contact someone?
So what exactly happens? The subscriptions that have to be expired still working on Stripe?
We have setup everything as explained above but when we try to test it we are getting
2. This Webhooks step hit an error.
“The app returned “Internal Server Error”.
Please tell me what is the problem here?
We have found that the Stripe library needs to be updated for the script to work with newer PHP versions.
The update is in progress as we speak and it is to be released in the coming days.
New version released!
We just released version 1.1!
The new version includes an update to the Stripe library and some fixes to make the script compatible with the latest PHP versions