mermberfix logo x
The MemberFix Team’s got you covered.
Membership plugins

Removing Teachable access based on Stripe subscriptions

teachable stripe

Introduction

WordPress can get complicated if you're using it to sell and deliver your online course.

For that reason, you may have decided to use Teachable instead. And for payment processing, you're probably using Stripe in conjunction with Clickfunnels or some other 3rd party shopping cart platform.

There's just one problem: how do you cancel a member's access automatically when they cancel their subscription or ask for a refund?

We can do that using Zapier and Stripe Webhooks in a ‘custom Zap'!

Setup steps

There are four main steps to this process:

A) Set up the first step of the Zap

B) Create the Stripe Webhook

C) Trigger an event for the Webhook

D) Complete the last step of the Zap

Set up the first step of the Zap

1 – First of all we need a Zapier account.

You can either make your own account or we can host you Zap for you for a $3/month fee.

 

If you're a customer past or present, we can host zaps for you for only $3/mo. We can even set up a zap for you on our MemberFix Lite plan. Zapier accounts start at $25/mo, so save yourself some money, and have us take care of everything for you!

2 – When you are logged into Zapier you need to press “Make a Zap!”

step 1 in Zapier - Removing Teachable access based on Stripe subscriptions

 

3 – When the search input shows up, you need to type in “Webhooks” and then click on “Webhooks by Zapier”.

step 2 in Zapier - Removing Teachable access based on Stripe subscriptions

 

4 – We need to select “Catch Hook”

step 3 in Zapier - Removing Teachable access based on Stripe subscriptions

 

5 – Now you should see your webhook link. Copy that link to your clipboard. 

step 4 in Zapier - Removing Teachable access based on Stripe subscriptions

Create the Stripe Webhook

1 – Inside your Stripe dashboard you have to click “Developers”

step 1 in Stripe - Removing Teachable access based on Stripe subscriptions

 

2 – When the menu opens, click on “Webhooks”.

step 2 in Stripe - Removing Teachable access based on Stripe subscriptions

 

3 – Now add the endpoint for your webhook.

step 3 in Stripe - Removing Teachable access based on Stripe subscriptions

 

4 – Now add the link that you have copied and also the events.

step 4 in Stripe - Removing Teachable access based on Stripe subscriptions

Note: Please pay attention to the events!

The correct events in this case are “charge.refunded” and “customer.subscription.deleted“. These events represent refunds and cancellations, respectively.

Trigger an event for the webhook

Note: Here I can't really give you a guide.

You have to buy your subscription and then either refund yourself or cancel your subscription.

But I've added it as one of the higher steps because it's crucial for our task. Otherwise you won't have any data for Zapier to pull from the Webhook and you won't be able to finish your Zap.

Complete the last step of the Zap

1 – Add a new step to your Zap.

step 5 in Zapier - Removing Teachable access based on Stripe subscriptions

 

2 – Pick “Action/Search” from the list.

step 6 in Zapier - Removing Teachable access based on Stripe subscriptions

 

3 – In the search input type “Teachable”.

step 7 in Zapier - Removing Teachable access based on Stripe subscriptions

4 – Select “show less common options”.

step 8 in Zapier - Removing Teachable access based on Stripe subscriptions

5 – Select “Unenroll Student From Course”

step 9 in Zapier - Removing Teachable access based on Stripe subscriptions

 

6 – Connect to your Teachable account

step 10 in Zapier - Removing Teachable access based on Stripe subscriptions

 

After clicking that button you'll see a new browser window:

step 11 in Zapier - Removing Teachable access based on Stripe subscriptions

Fill the form and hit “Yes, Continue”.

 

7 – After the connection click “Save & Continue”.

step 12 in Zapier - Removing Teachable access based on Stripe subscriptions

 

8 – Before filling the Teachable user data form, let's find your user. To do that, click “Add a Search Step”.

step 13 in Zapier - Removing Teachable access based on Stripe subscriptions

 

After pressing the button a pop-up should appear. There you will need to confirm that you want to add a new step to your Zap.

step 14 in Zapier - Removing Teachable access based on Stripe subscriptions

 

9 – Now fill in the email field. Do that by pressing on the list button.

step 15 in Zapier - Removing Teachable access based on Stripe subscriptions

 

10 – From the list select “Data Object Metadata Email”.

step 16 in Zapier - Removing Teachable access based on Stripe subscriptions

11 – Hit “Save & Continue”.

12 – Get back to the 3rd step of the Zap and fill out the form by selecting the course that you want to remove the user from.

stripe 17 in Zapier - Removing Teachable access based on Stripe subscriptions

13 – Activate your zap.

All done!

Now let's hear from you!

What kind of learning material are you selling with Teachable?

Tell us in the comments section below.

You may also enjoy...

WordPress based membership sites have certain requirements, and make use of certain applications that, in my experience, makes most of the popular hosting providers a poor choice.
Looking for a way to transfer your sales/leads from ThriveCart to ActiveCampaign? Click here to read our comprehensive tutorial!
Embedding JWPlayer In An OptimizePress Video Lightbox Element.
How to use WP Fusion and Active Campaign automation for managing tags and replacing users between tables
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Simon
Simon
March 31, 2020 8:51 am

Hey Sorin, I came to this article while trying to configure Stripe as a Gateway to handle Teachable subscriptions.
Do you know a way to configure a Zapier from Stripe to Teachable in order to automatically enroll a User into teachable when a specific Product on Stripe has been purchased?

Thanks!