Skip to main content
All CollectionsIntegrationsZapier
Zapier tutorial: Revoke posting rights and close listing after a subscription is cancelled
Zapier tutorial: Revoke posting rights and close listing after a subscription is cancelled

Learn how to automatically revoke a user's posting rights and close their listing after a supply subscription is cancelled.

Yifan Dong avatar
Written by Yifan Dong
Updated today

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

  1. 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.

  2. Stripe account

How to set up your marketplace

  1. Correct User Permissions

  2. 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.

  3. 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.

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.

  1. Click on "+ Add a new application".

  2. Give the application a descriptive name (like Zapier), and select "Integration API".

  3. Click "Add application".

  4. 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

  1. Go to www.zapier.com and log in with your account (or create a free one, if you don't already have one)

  2. 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.

  1. Connect your Stripe account by logging in with your username and password

  2. Choose "Canceled Subscription" as the Trigger event

    1. Click "Continue" to move to the "Configure" section

  3. Select "False" in "Use test mode data...?" fields.

    1. Click "Continue" to move to the "Test" section

  4. 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.

  1. In the Setup section, select Sharetribe as the app

  2. Select "Update Permissions" as the Action event

  3. Connect your Sharetribe account

    1. Click Continue to move to the Configure section

  4. Enter "Customer Metadata User ID" in the User ID field

  5. Select "False" in the Permission to post listings field.

    1. Click Continue to move to the Test section

  6. 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.

  1. In the Setup section, select Sharetribe as the app

  2. Select "Close listing" as the Action event

  3. Connect your Sharetribe account

    1. Click Continue to move to the Configure section

  4. Enter "Customer Metadata Listing ID" in the Listing ID field

    1. Click Continue to move to the Test section

  5. 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:

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!

Did this answer your question?