Welcome to a practical Zapier tutorial! In this guide, we'll walk through automating the granting of a user permission right after a subscription fee is paid. Granting certain rights is a key step to implementing a subscription fee in a marketplace.
By default, user permissions and rights are adjusted manually in Console. With Zapier, you can automate this process. Once the payment is confirmed via Stripe, Zapier triggers the user permission update in Sharetribe. This automation saves you time and effort by eliminating manual granting of user permissions.
Let’s dive into the technical setup and streamline your marketplace workflow!
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 understand better 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
Stripe Payment Page
Set up a Stripe payment page to collect the recurring fees. This page will handle the payments before automatically granting the user permission.
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.
How to set up your marketplace
1. Depending on the type of subscription model you want to implement, you can configure one of the following access control settings, and grant users the corresponding permissions:
Restrict posting rights
Restrict rights to view listings (if you have a private marketplace)
Restrict transaction rights
2. Dynamic Parameters Set Up
Add the User_ID and Email Address as dynamic parameters to the access control CTA button. This is crucial to ensure that the correct User ID and email address are fetched during the Zap process so the correct user gets granted the transaction rights.
3. Marketplace Activity
Your Sharetribe marketplace (test or live) should have at least one user who doesn't have the corresponding permission so that Zapier can perform the action of granting the permission and test whether this works. If you don’t have any recent users, create one now to ensure there’s data for Zapier to process.
4. Email notifications
You likely want to make sure your users are notified when their permissions are updated. You can do this from the 'Email notifications' section of your Console. From there, you can check if the 'User permissions changed' email notification is enabled, and enable/disable it if needed. You can read more about email notifications in Sharetribe from this article.
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)
Open the pre-made Zap for granting permissions on Sharetribe here.
Click on ‘Try this Zap'
Step 1: Find the payment in Stripe
First, locate the payment in Stripe that will be used as the trigger for granting the user permission right to a user in Sharetribe.
In the Setup section, select the Stripe as the app.
Select "Checkout Session Completed" as the Trigger event.
Connect the Stripe account where you have set up the subscription payment page.
Click Continue to move to the Configure section.
Select "True" in the would you like to use test mode data for the test sample field.
Click Continue to move to the "Test" section.
Test the trigger, and make sure it finds a recent Stripe payment. You can perform a Stripe payment in Test mode (Learn how here).
Step 2: Save the user ID in the customer information
This step will be essential if you plan to automate the revoking of the user permission after their subscription is canceled. By storing the marketplace User ID in the customer information on Stripe, Zapier can automatically identify the correct user and revoke their permissions once the subscription is canceled. In this case, the "customer" in Stripe refers to the user on the marketplace who paid the subscription fee.
In the Setup section, select the Stripe as the app.
Select "Updated Customer" as the Action event.
Connect the Stripe account where you set up the subscription fee payment page.
Click Continue to move to the Configure section.
Select "Customer ID" in the customer ID field.
Scroll down to the "Metadata" field, and enter
User_ID
as the field name, and select Client reference ID as the value.Click Continue to move to the "Test" section.
Test the step to confirm that Zapier has saved the User ID in the metadata field of your customer in Stripe.
Step 3: Grant permission
The next step is to update the corresponding user's permission in 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 tab
Add "Client reference ID" or "Metadata User ID" in the User ID field.
Select "True" for the Permission you want to grant the user and leave the other options unchecked. You can update the following permissions:
Permission to view listings
Permission to post listings
Permission to initiate transactions
Test this action to confirm that Zapier grants the correct permission to the correct user on your marketplace.
If you have enabled the relevant email notifications in your Console, an email notification is sent automatically to the user about their updated rights.
Final thoughts
Thanks for reading this tutorial about creating a Zap for your Sharetribe marketplace to automatically grant permissions to a user after a subscription fee is paid!
There is a companion tutorial for the revoking of user rights after a subscription is cancelled. Follow this tutorial to set it up.
You can also learn more about the possibilities to monetize with one-time fees or possibilities to monetize with subscriptions.
Feel free to read through other parts of our Zapier guide as well: the Introduction and the article about Events and Actions. We also have tutorials and templates for various different Zaps available, including SMS notifications, digital calendar invites, and more. You can read about all our templates in this article.
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!