If you are using ThriveCart as your payment processor, you might know that we already have a direct API integration with them.
If you want to connect your Thrive Themes account to ThriveCart, feel free to check out these articles:
However, there is one more way in which you can create this connection, and that is by using Thrive Automator and ThriveCart webhooks.
In this article, I want to show you how to use the Incoming Webhooks start trigger from Thrive Automator to interconnect the two platforms, so that whenever someone makes a purchase via ThriveCart (a course, for example), they are granted access to one of your Thrive Apprentice products.
Besides ThriveCart (which is not, in any way, associated with us), the plugins used in this article are:
These are the steps to be taken in order to create this setup:
Create a Thrive Apprentice product that contains the course you want to sell;
Create the product in ThriveCart;
Create the automation in Thrive Automator that receives the user data upon course purchase completion;
As someone purchases the product set up in ThriveCart, an automation will be triggered and get the user information.
Once the webhook is received (the product has been purchased), the automation will have to check whether an account associated with this user already exists so that they will be added as a subscriber to your site.
If the user has not been found, an account will be created and they will be added as a subscriber.
After that, they will be granted access to one of your Thrive Apprentice products.
Here is how to create this setup:
Create your product in ThriveCart
You will need to start by setting up the ThriveCart product, and we've described that process and how to connect it to your Thrive Apprentice product in this article.
We've also created an article that shows how to add a ThriveCart checkout form URL to your Thrive Architect page, and you can find it here.
Set Up Webhooks in ThriveCart
After setting up the product in ThriveCart, go to the top menu, click on your profile icon and access the "Settings" section:
We will have to register the webhook here, so go to the "API & Webhooks" section:
Here, choose the last option ("Webhooks & Notifications):
This opens a list of the available webhooks coming from third-party services, that you've integrated with so far (in case you've done that). To add the webhook needed for this setup. click on "Add another webhook":
You will have to add the name for the connection and the Webhook URL:
We will get the webhook URL that needs to be inserted here from Thrive Automator.
To be able to use the webhook and properly populate the fields with the necessary information, we will need to work in both Thrive Automator and ThriveCart at the same time.
Therefore, you can access the Thrive Automator dashboard, from where we will start setting up the automation and come back to the ThriveCart webhook setup to add the webhook URL.
Create the automation in Thrive Automator
Access Thrive Automator from your Thrive Dashboard (or from the left sidebar of the WordPress admin dashboard):
Click on "Add New" to create a new automation:
You can start by naming it, and then choose the start trigger.
Choose the "Incoming Webhook" start trigger
The start trigger that is needed here is the "Incoming Webhook" one:
Firstly, we will need to copy the Webhook URL and return to the ThriveCart dashboard and finish setting up the webhook.
Therefore, you can go ahead and copy the webhook URL:
Go back and add the webhook URL in ThriveCart. Click on "Save this webhook":
Make a test payment and use the listen mode of the trigger
To continue setting up the "Incoming Webhook" trigger, we will need to populate the fields with the necessary information of the user who has purchased the course, such as their name, email, etc.
For that, we can use the "Listen" option found in Thrive Automator.
This will make the automation listen to any events for the next minute, and you can make a test payment from ThriveCart, to simulate a purchase and send the user information to the automation.
To do that, I will access one of my products and create a test payment. Right before I finish the purchase, I will click on "Listen" in Thrive Automator. Here is a short animation to show you how to do this:
This will add all of the fields available upon making the purchase, but you can remove the ones that you do not want to be populated:
An important step here is to look for the "Email" field and make sure that "email" is selected as the correct type of field:
In case you want to add an extra layer of security here, you can use the "Security Settings" section:
The security settings are just an additional layer of security. If you decide to add key-value pairs here, when the Incoming Webhook does not receive these values in the header, it will be rejected and the automation will not fire.
Choose a filter (optional)
Optionally, before moving to the next step, you can add a filter in the automation. Doing this can be an additional step that will ensure the automation only starts in the right situation.
For example, you can add a filter to have the automation run only if a specific product has been purchased. For example, you can use a "Product ID" field in this filter.
If you want to do that, go ahead and add a "Filters" as the next action:
You will then have access to this dropdown, that will populate with the fields that have been sent over from ThriveCart when using the "Listen" feature of the Incoming Webhook start trigger.
For example, to have the automation start for a specific product, you can go for the "base_product_name" field here, to make sure that the automation only starts for a specific product. Or you can use the date filter, in case you're running a promotion, etc.
Click on "Done" when you finish setting up the filter:
Choose the next action - "Find or create user"
As the next action that should happen once the payment has been made, I will choose the "Find or create user" one:
This way, in case the person who has just purchased the product was already a user on my site, the system will look for them and will grant them access to the product.
In case they have not created an account on my site prior to this step, the automation will automatically create a user for them, and they will receive an email with the login information:
If you choose this step, you'll have to choose a user role to be given to the users going through the automation, and you can also map out the first and last name:
Choose the next action - "Grant access to product"
To finish the setup, we will need to choose "Grant access to product" as the next and final action. For that, click on "Add another action" and choose the "Grant access to product" one:
Next, choose the Thrive Apprentice product for which the access should be granted (this should be the same product that was purchased via ThriveCart). Click on "Done" when finished:
The automation is ready and you can save and publish it.
Add the ThriveCart product checkout URL to one of your pages
In order to have the product available on your pages, for your users to easily be able to purchase it, you can add the checkout URL of the product as a button or link to one of your pages.
Go to your product and grab its checkout URL and copy it to your clipboard:
After that, you can go ahead and open one of your pages using Thrive Architect. This should be the page on which you wish to add the button or link that takes people to the checkout page:
In this case, I will use a "Button" element and add it to my page. If you need more information on how to add and customize such an element, please take a look at this article.
Once you've added and customized the "Button" element, go to the "Button Link" section of the left sidebar and add the checkout URL in the "Target URL" field.
If you want to add the ThriveCart checkout form URL directly to your Thrive Architect page, we've written step-by-step instructions here.
Don't forget to save the page.
This is how you can connect your Thrive Themes Website to ThriveCart, with no additional API requirements.
I really hope this article was useful. If that's the case, a smile below is really helpful to us 😄