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

How To Automatically Find And Cancel Duplicate Stripe Subscriptions

How To Automatically Find And Cancel Duplicate Stripe Subscriptions

Overview

Do you want a simple, automated way to prevent duplicate Stripe subscriptions and accompanying double billing issues?

This step by step tutorial will show you how to do it. 🙂

Here’s the scenario:

Let’s say somebody just purchased one of your subscription offers but they didn’t realize that they already have a subscription for that product.

If you only want your customers to be able to have one active subscription at a time for a particular offer, you’ll need a way to cancel this duplicate subscription in Stripe.

Ideally this method will be fully automated to save you time and to avoid double billing and customer support headaches.

Unfortunately, Zapier can’t directly check for and cancel duplicate subscriptions in Stripe.

So you have to use a small (but perfectly valid) workaround.

What You’ll Need For This Tutorial

1 – Stripe account.

2 – Zapier account – You’ll need a paid account since we’ll be creating a multi-step zap.

*Alternatively, we can host and manage Zaps for you at $5/mo/zap. 🙂

3 – Google drive account.

Video Tutorial

Create a spreadsheet where we can check for new users

First of all, you’ll need to get all the current data from your Stripe account.

1 – Login to Stripe, go to the subscription section, and click on the export button:

Screenshot 147 1024x157 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

 

2 – Choose “All” in the “Date Range” section and click on “Export”:

Screenshot 146 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

3 – Now I suggest that you re-arrange the order of the fields in the exported CSV file.

Here is the order I use:

Screenshot 143 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

 

4 – Now upload this .CSV file to google docs. 

Creating a zap that will check and add the data in the spreadsheet

1 – Login to Zapier and click on the “Make a Zap” button:
Screenshot 148 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

 

2 – Choose the Stripe app and a “New charge” trigger.

Screenshot 142 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

3 – Now you need to check whether or not the charge is for a new or existing customer.

To do this, you’re going to configure Zapier to check the spreadsheet you just imported into Google Drive.

4 – Choose “Lookup spreadsheet row” as your action and go through the steps to select the spreadsheet in your Drive account.

Choose the “Email” column.

5 – In the “Lookup value” choose the email of the customer that made a charge.

Screenshot 136 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

6 – Now you need to create a “Paths” step.

This is because you need to add a customer to the spreadsheet if he / she is new, and cancel the subscription if the customer already has an active subscription.

Screenshot 149 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions 

7 – Let’s start work on the “A” path.

Continue this step if “Email” exactly matches “Value in column A”.

It’s a default value if the Zap doesn’t find any row in the spreadsheet.

Screenshot 137 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

8 – If the zap meets this condition, you want the Zap to add this new customer to your spreadsheet.

Choose the “Find or create row” action and set it up to find a row using “Email” just as you did in the previous step.

Screenshot 138 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

9 – Click on the “Create Google Sheets Spreadsheet Row if it doesn’t exist yet” checkbox and enter the data you got from the first Stripe step:

Screenshot 139 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

10 – Now you can start working on the “B” path.

For the first condition choose the same one as you had on the “A” path.

“Email” does not contain the “Value in column A” value.

And the second condition should be “Status” contains the “Active” value.

Screenshot 140 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

If this step meets all conditions the Zap will cancel the current Stripe subscription.

11 – Choose the “Cancel subscription in Stripe” action and subscription ID from the first Stripe step:

Screenshot 141 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

12 – Your zap should now look like this:

Screenshot 135 - How To Automatically Find And Cancel Duplicate Stripe Subscriptions

13 – Activate this zap and let the Zapier magic do all the work for you!

 

14 – Note that you may only want this zap to run for specific products you sell but not for others. 

In that case you would need to create filter steps after the first “New charge in Stripe” trigger.

15 – Note that this zap will not be totally fool proof because some customers use different emails. 

e.g. Customer has an existing subscription under the email johnsmith@gmail.com but signs up for another subscription of the same offer using smith.john@protonmail.com 

Although it’s not perfect, it’s a simple zap to set up could save you and your team hours of manual work as time goes on.

Now let’s hear from you!

Are you using zapier in your projects?

Tell us which ones 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.
Learn how to control the visibility of your Table of Contents (TOC) on a post by post basis using our crafty tutorial!
Learn how to add custom placeholder text to the USERNAME and PASSWORD fields of your MemberPress login form using our step by step guide!
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
The globe
October 14, 2022 4:59 pm

That’s what I was looking for. My only question is if payment for an existing subscription is considered a charge. Let’s say I have a user registered to a subscription, and we are charging them for the monthly subscription, will the subscription get canceled using this method?

Risto Karaivanov
Reply to  The globe
October 17, 2022 1:25 am

Hi there!

Every subscription has transactions added to it as the billing cycles are made.

Each payment made is a new transaction and is considered a charge.

If the user has multiple subscriptions (i.e. 2 different subscription products or, one subscription billed twice), then this automation can help you filter that data and cancel the extra subscription. 🙂

I hope this answers your question!

If you need further assistance, please don’t hesitate to contact us.

Kind regards,
Risto