One of our customers uses the MemberMouse WordPress plugin as his membership solution and PayKickstart (PKS) as his checkout and funnels solution.
Normally, MemberMouse and PayKickStart don’t integrate very deeply so we created a tighter integration for him and explained exactly how to do it in a related post…
Recently, this customer came to us requesting an additional integration between MemberMouse, PayKickStart and ConvertKit.
Namely, he wanted to be able to cancel a MemberMouse and PayKickstart subscription for a member when a certain tag gets assigned to that same member in ConvertKit.
We’ve created this solution for him by using a custom PHP script and Zapier.
Now you get to use it too! 🙂
What You’ll Need
1 – MemberMouse – WordPress membership plugin
2 – Zapier account – Used for API integrations
3 – A PayKickStart account – An excellent checkout and funnels solution
Create the custom WordPress PHP template
First of all we will create a WordPress template.
IMPORTANT: I highly recommend that you first create a child theme, or use the My Custom Functions WordPress plugin whenever you add custom code to your theme files. Otherwise, any time you update your theme your changes will get wiped out!
1. You need access to your website FTP.
Just duplicate the page.php file from your theme files and name it convertkit-page.php.
Open convertkit-page.php and add this to the top of it:
2. Go to your WordPress Dashboard and click on Pages => Add New.
Name the page “ConvertKit Page” and select “ConvertKit” as page template.
Set the permalink to /convertkit-page/ so that your page will be https://yourdomain.com/convertkit-page/.
3. Next step is to add some php code to the page template which we have created.
Open convertkit-page.php and just below the opening tag add the below code:
As you can see in the above code, you will need your auth_token from PayKickstart.
You can find it on your Account Details page.
You will also need the ID of the custom field where the PKS subscription ID is stored.
(You can find more info about this in this article where we explain how to integrate MemberMouse with PayKickStart).
The connection between MemberMouse and PayKickstart is based on this subscription ID.
Create the Zap
In order to trigger the above code when a certain tag is added in ConvertKit, we will need to create a Zap.
1. Go to your Zapier account and click on “Create Zap” button:
2. For the first step, under the first tab choose “ConvertKit” for “Choose App” and “New Tag Subscriber” for “Choose Trigger Event“:
3. Under the second tab, “Choose Account“, you need to add your ConvertKit account.
In the pop-up which will appear you will need to add your ConvertKit API Key:
You will find this API Key in you ConvertKit Account under Account Settings:
4. For the next tab, “Customize Subscribe To Tag“, you just need to select the tag which you have already created in ConvertKit.
This is the tag which will start the cancel process.
5. For the step 2 of this Zap, under the first tab, “Choose App & Event“, choose “Webhooks by Zapier” and “GET”:
6. For the “Customize Request” tab, you will need to add the “yourdomain.com/convertkit-page/” in the URL field and for “Query String Params” you will need to add “user_email” and select “1. Subscriber Email” for it:
7. You can test the process on the next tab:
8. All is done! 🙂
9. Want our team to do this integration for you?
No problem, just visit our MemberFix product information page and send us a message!