1. Home
  2. Knowledge Base
  3. Thrive Apprentice
  4. Integrations
  5. Connecting Thrive Apprentice with Square

Connecting Thrive Apprentice with Square

Do you want to restrict a course or product access in Thrive Apprentice and make it available to only those who’ve made payments? You can enable this by connecting Thrive Apprentice with Square.

In this document, we’ll show you how to connect Thrive Apprentice with Square to enable a mandatory access requirement, and complete steps needed to enable course purchases with Square.

Connecting Thrive Apprentice with Square

The first step to be able to sell your Thrive Apprentice courses on Square is to establish a connection between them.

To do so, start by opening your WordPress admin area, navigate to Thrive Dashboard >> Thrive Apprentice and click on Settings in the left panel.

On the Thrive Apprentice settings page, click on Payments in the left column.

Under Payments, click on Square.

When you click Square, you’ll see a page informing you about the connection status. On this page, click the Connect Square button.

This will open your Square account. If you haven’t logged into your Square account in the current browser, login using the Login Form.

When you sign up or log into your Square account using the form, you’ll see a page asking you to grant permissions to Thrive Themes. This is a one time setting that is mandatory if you want to use Thrive Apprentice with Square on this website.

On this page, scroll down and click the Allow button.

After you allow Thrive Themes to access your Square account, you’ll be taken back to your website backend where you’ll see Square is now connected with Thrive Apprentice on your website.

Note: If you observe closely, the established connection is in the Production Mode by default. If you want to Connect the Sandbox in your Square account, refer to the next section in this document.

Connecting with Your Square Sandbox

A sandbox account is a safe space where you can test things without causing any real problems. It works like a copy of the real system, so you can make changes, run tests, or try new ideas without affecting the actual data or live system.

Before you click to Connect Sandbox from your Thrive Apprentice dashboard, open the Square developer console, and click on Sandbox test accounts in the left column.

On the Sandbox test accounts page, you’ll see a list of Sandbox test accounts you’ve created. If you don’t have a Sandbox test account for this connection click the New Sandbox test account button.

After clicking the button, enter the Sandbox test account name, select the country from the dropdown, and click the Create button.

Once the Sandbox test account is created, click on the Square dashboard beside the test account you want to connect.

Clicking this will open the Sandbox test account in a new tab. 

To ensure the connection between Thrive Apprentice and a Square Sandbox is established, you need to keep this Sandbox test account open in the tab.

After you’ve opened the Sandbox test account, open the Thrive Apprentice Square connection settings and click the Connect Sandbox button.

This will connect Thrive Apprentice to a Square Sandbox account that you can use to test the connection before pushing it live on your website.

Creating an Item in Your Square Account

Another important step here is to create items in your square account that you can associate with the courses in Thrive Apprentice.

When you connect Thrive Apprentice with Square you don’t have to create items into the Square account. This can be managed through Thrive Apprentice alone.

So, to link a Thrive Apprentice product with Square, begin by opening your WordPress admin area, navigate to Thrive Dashboard >> Thrive Apprentice, and click on Products in the left column.

On the Products page, click on the product that contains the course you want to sell using Square.

On the individual product page, click Access requirements in the left column.

On the Access requirements page, click to expand the Square tab.

In the expanded Square block, start by adding the product price by clicking the +Add Price button.

Clicking the button will open a popup where you can select to add the price under the recurring tab or one time.

Under the recurring payment tab, enter the product price, the billing period and decide whether the product includes a trial period.

Note: You can set a product trial period only once. This cannot be edited later.

If you want to enable one time payment for the course, click the One Time tab, enter the product price and click the Save button.

After you add the price, add a Success and a Failure URL in the fields below. These are the pages that will be displayed when the user purchases a product successfully or when a failure is encountered.

In these fields, enter the URLs if the page is created. If not, click the Create new page link to create new pages that you can edit in Thrive Architect.

After you finish adding the price and the URLs, click to open the Advanced settings that you can manage too.

Under Advanced settings, enable the toggle button to pre-populate email at checkout when user is logged in.

After you finish adding the price, the URL and enabling to pre-populate emails, click the Save button.

Creating a Webhook in Square

A webhook in Square is necessary so that user activities like product purchases, refunds, etc. are tracked and the right action is performed.

To create a webhook in Square, open the Square developer console, and click on Applications in the left panel.

On the Applications page, click the plus icon inside the block.

Clicking the plus icon will open a popup where you enter the Application name, agree to Square Terms and Conditions, and click the Next button.

After entering the application name, you can set the following or choose to skip and move to the next steps.

  • What will you build first?
  • Find your audience

On the next page that appears, click on Webhooks in the left panel.

Under Webhooks, click Subscriptions.

On the Webhook Subscriptions page, click the Add Subscription button on the right.

When you click to add a new subscription, you’ll be taken to a page where you have to enter the webhook details.

The URL you need to enter here can be found on the page inside the Thrive Apprentice dashboard after you’ve successfully connected with Square.

On the Square webhook detail page after clicking Add subscription, enter the webhook name, the URL you’ve just copied, and select all the events in the form.

When you enter all the webhook details, click the Save button on the top right.

Need more information about webhooks in Square? You can refer to the document here.

Displaying the Square Buy Button

Once you connect Thrive Apprentice with Square you need to ensure the buy button you display is that of Square.

Before you set things up in the Thrive Apprentice product access restrictions, ensure the option is enabled under Square.

To do so, open your WordPress admin area, navigate to Thrive Dashboard >> Thrive Apprentice, and click on Settings in the left panel.

On the Settings page, click on Payments in the left column.

Under Payments, click Square.

On the Square connections page, ensure the display buy button for Square is enabled.

When this option is enabled, it’s time to set it up for the product you are planning to sell with Square. To do so, start by opening your WordPress admin area, navigate to Thrive Dashboard >> Thrive Apprentice, and click on Products in the left panel.

On the Products page, click on the product you want to set this up for.

On the individual product page, click on Access restriction rules in the left column.

On the product access restriction rules page, scroll down to the Action button display section and click on display buy button link.

When you click the link, you’ll see a popup where you select the display buy button in the first dropdown and Square in the second.

After you select to display the Square buy button, click the Save button.

Ensuring Your Customers from Square Receive Transactional Emails

Thrive Apprentice lets you send transactional emails from your website at different instances. These are sent when a new account is created, when a certificate is issued manually, when the product access is expiring, etc.

When you connect Thrive Apprentice with Square you need to ensure the users making a new purchase through Square receive an email when their account is created.

To do so, open your WordPress admin area, navigate to Thrive Dashboard >> Thrive Apprentice, and click on Settings in the left panel.

On the Settings page, click on Email templates in the left column.

On the Email templates page, click on the dropdown to select an email template.

In this dropdown select New Account Created.

When the New Account Created email template is opened, scroll down to Email triggers and check the box to enable Square – new account created after purchase.

After enabling the trigger, click the Save template button.

We’ve just seen how you can connect Thrive Apprentice with Square, link it with a product in Thrive Apprentice, create webhooks to track actions, display the square buy button and ensure new users receive an email after purchasing through Square.

Next, do you want to manage the access restriction rules at product level? Read our document here to learn more.

Was this article helpful?

Related Articles

>