Welcome to a practical Zapier tutorial! In this guide, we'll learn how to revoke posting rights from a user and close their listing after the listing fee subscription is cancelled.
This Zap can be used if you have a supply subscription monetization model, and you want to automate revoking a provider's posting rights and closing their listing after they cancel a subscription.
For this Zap to work in full, you should also set up the Zaps to grant posting rights when a subscription is paid and store the listing ID to Stripe.
About Zapier
Zapier is a powerful and versatile tool for integrating different tools into your marketplace. You can learn more about Zapier in our introductory article or through this brief video from Zapier.
If you haven’t read the introduction and the action/event Zapier articles, we encourage you to do so to better understand how Zapier works. But if you want to dive straight into action, feel free to read on!
What you need for this tutorial
External accounts
Zapier Account
Create a Zapier account if you don’t already have one. You can sign up at www.zapier.com.
During registration, Zapier may ask which apps you plan to use. You can enter Sharetribe at this point or add it later.
Stripe account
This tutorial assumes that you have implemented a supply subcription monetization model using Stripe as the payment gateway. Learn how to set up a payment page to charge recurring fees
How to set up your marketplace
Correct User Permissions
This tutorial assumes that you have enabled Restrict posting rights in your marketplace. This can be done in the Access Control page in your Console.
Subscription system on Stripe
You’ll need to have set up a supply subscription page on your Stripe account. Learn how to set up a supply subscription.
In order to test this Zap, there needs to be at least one user with a cancelled subscription on your Stripe account. You can both initiate and cancel the subscription manually from your Stripe dashboard for the purposes of this tutorial.
Metadata settings on Stripe
The user whose rights you are modifying needs to have the correct metadata in their user account. Specifically, they need to have a field called “User ID” that includes their Sharetribe user ID. Moreover, you need to have the correct Listing ID so Zapier know which listing on the marketplace it needs to close.
These can be added manually on the Stripe dashboard, for example just for the sake of this tutorial. If you choose to do so, you can find the metadata settings by opening the customer's information sheet on your Stripe dashboard, and editing the metadata from the lower right corner of the screen.
However, it’s best to automate this step following the tutorials below:
With these pieces in place, let's get started!
Getting your Integration API key from Console
You'll need Integration API keys to connect your Sharetribe marketplace to Zapier.
Navigate to Build > Advanced > Applications.
Click on "+ Add a new application".
Give the application a descriptive name (like Zapier), and select "Integration API".
Click "Add application".
Important: Copy and paste the Client ID and Client secret to a safe place, like a password manager.
IMPORTANT: Think of the Client ID and Secret as a sort of a password to your marketplace that can be used to access your marketplace data through other services. Note that you won’t be able to ever see the Client secret to this application again in the Console under any circumstances. Make sure you copy it to a secure place. If you lose it, you will need to create a new application.
Creating the Zap, step by step
(Optional) Importing a pre-existing Zap
Go to www.zapier.com and log in with your account (or create a free one, if you don't already have one)
Click on ‘Try this Zap'
Step 1: Find a cancelled subscription from your Stripe account
To begin, set up the trigger that identifies cancelled subscriptions from your Stripe account.
Connect your Stripe account by logging in with your username and password
Choose "Canceled Subscription" as the Trigger event
Click "Continue" to move to the "Configure" section
Select "False" in "Use test mode data...?" fields.
Click "Continue" to move to the "Test" section
Test the trigger, and make sure it finds a cancelled subscription from your marketplace, along with all related information.
Step 2: Revoke user's posting rights
Once a cancelled subscription is detected, the next step is to revoke the user's ability to post listings on your marketplace.
In the Setup section, select Sharetribe as the app
Select "Update Permissions" as the Action event
Connect your Sharetribe account
Click Continue to move to the Configure section
Enter "Customer Metadata User ID" in the User ID field
Select "False" in the Permission to post listings field.
Click Continue to move to the Test section
Test that Zapier successfully revokes the correct user's right to post listings.
Step 3: Close user's listing
Finally, automate the process of closing the listing whose user's subscription was cancelled.
In the Setup section, select Sharetribe as the app
Select "Close listing" as the Action event
Connect your Sharetribe account
Click Continue to move to the Configure section
Enter "Customer Metadata Listing ID" in the Listing ID field
Click Continue to move to the Test section
Test that Zapier successfully closes the correct user's listing on the marketplace.
That's it! The user's right to post listing should now be revoked, and their listing on the marketplace closed.
Final thoughts
Thanks for reading this tutorial about creating a Zap to revoke posting rights and close listing after a subscription is cancelled!
Remember that this Zap is only necessary if you plan to automate thethe supply subscription monetization model. If you haven't already, check out the accompanying Zapier tutorials below:
You can also learn more about the Sharetribe-Zapier integration or review all our Zapier templates for automating marketplace workflows.
Please get in touch with us from your Console or from the bottom right section of this page from the chat widget if you have any questions about this guide, or anything else. We'll be happy to help!