Skip to main content
All CollectionsIntegrationsZapier
Zapier tutorial: Grant permissions after a subscription fee is paid
Zapier tutorial: Grant permissions after a subscription fee is paid

How to automatically update a user's permission after a subscription is paid using Zapier.

Yifan Dong avatar
Written by Yifan Dong
Updated over a week ago

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

  1. Stripe Payment Page

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

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.

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. Open the pre-made Zap for granting permissions on Sharetribe here.

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

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

  2. Select "Checkout Session Completed" as the Trigger event.

  3. Connect the Stripe account where you have set up the subscription payment page.

    1. Click Continue to move to the Configure section.

  4. Select "True" in the would you like to use test mode data for the test sample field.

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

  5. Test the trigger, and make sure it finds a recent Stripe payment. You can perform a Stripe payment in Test mode (Learn how here).

IMPORTANT: Test payments in Stripe (payments using test credit card credentials and the test checkout page) do not work as triggers in Zapier. This means you will not be able to test the fully automated workflow while Stripe is in Test mode. Only Live mode payments on a live checkout page can trigger a Zap. Nevertheless, you can use Stripe’s test data only if you are finding the record it creates in Zapier manually while testing your Zap.

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.

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

  2. Select "Updated Customer" as the Action event.

  3. Connect the Stripe account where you set up the subscription fee payment page.

    1. Click Continue to move to the Configure section.

  4. Select "Customer ID" in the customer ID field.

  5. Scroll down to the "Metadata" field, and enter User_ID as the field name, and select Client reference ID as the value.

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

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

  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 tab

  4. Add "Client reference ID" or "Metadata User ID" in the User ID field.

  5. Select "True" for the Permission you want to grant the user and leave the other options unchecked. You can update the following permissions:

    1. Permission to view listings

    2. Permission to post listings

    3. Permission to initiate transactions

  6. Test this action to confirm that Zapier grants the correct permission to the correct user on your marketplace.

Note: Users are not automatically notified when their permissions are updated. You'll need to collect details about the user to send them an email notification.

Step 4: Collect user details

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

  2. Select "Show user" as the Action event.

  3. Connect your Sharetribe account.

    1. Click Continue to move to the Configure section.

  4. Select "Metadata User ID" in the User ID field.

  5. Select "No" in Should this step be considered a success if no search results are found?

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

  6. Test the trigger and make sure it shows all the information related to that user (such as the first name).

Step 5. Notify user about being granted the transaction rights

  1. In the Setup section, select Gmail, or any Zapier-supported email tool you use for sending notifications email notifications from your marketplace.

  2. Select "Send email" in Action event.

  3. Connect your email account.

    1. Click Continue to move to the Configure section.

  4. Select "User Email" in the To/ receiver email address field.

  5. Fill in the "From" and "From name" with your marketplace email address and name, and add a Subject title.

  6. Select plain in the body type.

  7. In the Body field, write the message you want to communicate to your users when their user permission on the marketplace has been updated. You can add variables by clicking on the + icon such as the User profile first name. For example, you could write the following:

Hi

Thank you for your payment!

You can now initiate transactions on the marketplace

OR

You can now post listings on the marketplace

OR

You can view listings on the marketplace.

Best regards,
The Marketplace team

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!

Did this answer your question?