Skip to main content
Best answer

Revoke members access at the END of their subscription, not before...

  • November 19, 2024
  • 4 replies
  • 48 views

Forum|alt.badge.img

Hi Guys,

I'm currently using Wishlist Member on my Wordpress site and it is integrated with the Thrivecart payment platform.

While Thrivecart allows a members access to be revoked immediately if they cancel their subscription, it doesn't pro-rate the subscription i.e wait until the subscription expires before cancelling.

Is there a way to set up a Zap that does this?

I managed to create a Zap that does the same thing as Thrivecart, but when trying to add a “delay” there doesn’t seem to be a way to delay revoking access for the right period of time i.e. it is different for each member, depending on when they joined.

Thanks,
Michael

Best answer by mykl595Best answer by mykl595

Thanks for the help! 

It looks like there are a few different ways to do this. I’d reached out to Thrivecart who provided these steps which I hadn’t noticed when first attempting to set up the Zap:

 

When a subscription is cancelled, both the webhook and Zapier data includes information on the 'end of billing period' - so if you're using 3rd-parties via those methods, you would be able to set things up there to wait until the end of the billing period before progressing.
 
So I'll include this here in case you're interested to try it out! - 
 

  1. If you're using the Zapier trigger "recurring payment cancelled" then the end of billing date information is available in that, example: https://share.getcloudapp.com/NQu4kqne
  2. You'd then use the Delay > Delay until Zapier action: https://share.getcloudapp.com/OAu29Edo
  3. Then choose one of the billing end keys (doesn't matter which one, Zapier can understand both values) https://share.getcloudapp.com/ApueB1o0

 

I also submitted a feature request to Thrivecart. Hopefully they will add this at some point in future, Zapier looks like a good workaround in the meantime.

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2312 replies
  • November 21, 2024

Hi ​@mykl595,

 

Welcome to the Community. 

 

To delay revoking access until a subscription ends in Thrivecart, you can create a Zap that tracks each member's subscription end date using Google Sheets or Airtable. When a subscription is canceled, the Zap searches for the member's record calculate the remaining days until the end date using Zapier's Formatter and sets a delay for that period. After the delay, it triggers a step to revoke access in Wishlist Member. This requires pre-tracking subscription end dates in a spreadsheet or database.

 

I hope this helps. Let me know if you have any other questions.


Badger
Forum|alt.badge.img+5
  • New
  • 134 replies
  • November 22, 2024

I’m assuming you could use a code block to calculate the remaining days left in a subscription and then use that to find the date access should be turned off.  Using a delay block to delay that many days. 

I am assuming that Thrivecart can give you the subscription end date. You can then calculate the number of days to delay. 

Python example

from datetime import datetime, date

# Input data from Zapier replace with input_data = input_data['thrivedata']
input_data = {
    "end_date": "2024-12-31"  # Example end date in YYYY-MM-DD format
}

# Parse the provided end date
end_date = datetime.strptime(input_data["end_date"], "%Y-%m-%d").date()

# Get today's date
today = date.today()

# Calculate the number of days from today until the end date
days_until_end = (end_date - today).days

# Ensure the number of days is not negative (in case the end_date is in the past)
days_until_end = max(days_until_end, 0)

# Output the result
output = {
    "end_date": end_date.strftime("%Y-%m-%d"),
    "days_until_end": days_until_end
}




hope it’s useful


Forum|alt.badge.img
  • Author
  • Beginner
  • 1 reply
  • Answer
  • November 22, 2024

Thanks for the help! 

It looks like there are a few different ways to do this. I’d reached out to Thrivecart who provided these steps which I hadn’t noticed when first attempting to set up the Zap:

 

When a subscription is cancelled, both the webhook and Zapier data includes information on the 'end of billing period' - so if you're using 3rd-parties via those methods, you would be able to set things up there to wait until the end of the billing period before progressing.
 
So I'll include this here in case you're interested to try it out! - 
 

  1. If you're using the Zapier trigger "recurring payment cancelled" then the end of billing date information is available in that, example: https://share.getcloudapp.com/NQu4kqne
  2. You'd then use the Delay > Delay until Zapier action: https://share.getcloudapp.com/OAu29Edo
  3. Then choose one of the billing end keys (doesn't matter which one, Zapier can understand both values) https://share.getcloudapp.com/ApueB1o0

 

I also submitted a feature request to Thrivecart. Hopefully they will add this at some point in future, Zapier looks like a good workaround in the meantime.


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7415 replies
  • November 25, 2024

Thanks so much for keeping the Community updated here, ​@mykl595! 🤗 Really pleased Thrivecart’s Support team were able to offer a workaround for this while they work on getting that feature request added.

And want to say a big thank you to ​@Badger for sharing that helpful Python code example which folks can use as an alternative workaround—much appreciated! 🧡

Please do reach back out to the Community in future if you need help with anything else at all. In the meantime, happy Zapping all! ⚡