Welcome to a practical Zapier tutorial! In this guide, we'll learn how to store a provider's listing ID to their Stripe customer information, after their listing is published to the marketplace.
This Zap is designed to be used with the supply subscription monetization model and serves as a prerequisite for automating closing a provider's listing after they cancel their subscription. Since the Listing ID is not automatically saved in the provider's information in Stripe, we need to send the Listing ID there to ensure Zapier knows which listing to close when a subscription is cancelled.
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, 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 will implement a supply subscription monetization model using Stripe as the payment gateway. Learn how to set up a payment page to charge recurring fees
Subscription in Stripe
Make sure that your providers will start a supply subscription through Stripe. A subscription in Stripe designates the provider as a customer in Stripe's system. This allows you to store custom data within their customer profile.
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 the Zap template
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: Listing created
As the Zap trigger, we will use the listing creation event:
In the Setup section, select Sharetribe as the app
Select "Listing Events" as the Action event
Connect your Sharetribe account
Click Continue to move to the Configure section
Select "Listing created" as the Event type
Click Continue to move to the test section
Test this action to confirm that Zapier can find a newly created listing on your marketplace.
Step 2: Retrieve Provider User Information
Next, we need to extract the provider user's information. This will be crucial later when we need to identify the provider in Stripe by matching their email address.
In the Setup section, select Sharetribe as the app
Select "Show user" as the Action event
Connect your Sharetribe account
Click Continue to move to the Configure section
In the User ID field, insert "Listing author ID"
Click Continue to move to the test section
Test that Zapier successfully identifies the correct user who created the listing in your marketplace.
Step 3: Find customer in Stripe
In this step, we will locate the corresponding customer in Stripe with the active supply subscription. This is done so we can store the listing ID in the last step.
In the Setup section, select Stripe as the app
Select "Find customer" as the Action event
Connect your Stripe account
Click Continue to move to the Configure section
Select "False" in Use test mode data for the test sample
Enter "Customer email address" in the Find by field.
Enter "User email" in the Query field.
Click Continue to move to the test section.
Test that Zapier successfully identifies the correct customer in Stripe with an active supply subscription.
Step 4: Store listing ID into customer data in Stripe
Lastly, we will write the Listing ID data into the customer information in Stripe
In the Setup section, select Stripe as the app
Select "Update customer" as the Action event
Connect your Stripe account
Click Continue to move to the Configure section
Select "ID" in the Customer ID field
Scroll down to the Metadata" field, and enter
Listing_ID
as the field name, and select Listing ID as the value.Click Continue to move to the "Test" section.
Test the step to confirm that Zapier has correctly saved the Listing ID in the metadata field of your customer in Stripe.
That's it! The ID of the listing published by the provider on the marketplace should now be successfully stored in their respective customer's data in Stripe.
Final thoughts
Thanks for reading this tutorial about creating a Zap to store provider's listing ID to Stripe!
Remember that this Zap is only necessary if you plan to automate closing provider listings after a supply subscription is cancelled.
Check out the accompanying Zapier tutorials below to fully automate supply subscriptions:
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 through Console or the chat widget at the bottom right section of this page if you have any questions about this guide or anything else. We'll be happy to help!