Giving your users the option to purchase your courses through different payment gateways will give them flexibility and ease their access to your valuable content. You can choose between 4 popular payment gateways and you also have the capability of using more than one payment gateway at the same time. In case you are interested in subscriptions or installments, you can use Stripe since it can support both in our platform.
If you are interested in another payment gateway, that is not a built-in integration, you can also use it, as long as it supports the creation of HTML buttons. Some payment gateways, such as PayPal and PayFast, allow you to create HTML payment buttons that you can add to your school. In this case, as soon as you confirm the incoming payment, you can manually enroll the user (or you can automate the process via Zapier or our API).
How to create PayPal Payment buttons
1. Log in to your PayPal account and click on Settings → Website Payments.
2. Find the PayPal buttons option and click on Update.
3. Here you can choose a button type (e.g. Buy Now). Then add the course/service you are selling, set a tracking number, or change your currency.
Note: You should enter the Course ID as the Product ID in every button you create since you'll have to create a new button for every item you offer in your LearnWorlds school. This article describes how to copy the ID of your products.
4. You may customize button text and appearance. You can change the appearance and text of the default PayPal button, or you can enter a URL to use your own button image.
5. Once you are ready, click on Create button.
6. Copy the code for the new button you have just created so you can then add it to your LearnWorlds school.
How to add the PayPal buttons in your School
a. You can either add a new Section, by selecting the Embed template or add an Embed widget (usually on a course page).
b. To link the HTML button, copy the code (previous 6th step) and paste it within the embed section/widget. Don't forget to click Update.
- You will need to also edit the Layout of the Embed Code section/widget and insert for example a "20" value in the Bottom Padding.
- Embed widgets and sections can only be displayed in the Preview mode.
- To find Paypal logos HTML codes, kindly visit this link.
- If you wish to take your customers back to your school after the PayPal Checkout page, add to the PayPal buttons as a return URL your school's Home Page URL (which will be accessible to logged-out users too). Please find the respective instructions to achieve that here.
Once you see that you have received a PayPal payment from a user you can manually enroll them in the relevant course.
How to automatically enroll users in a product via Zapier
With LearnWorlds you can also automate the manual enrollment process with Zapier if you have a Premium PayPlan plan. (Note that the Zapier automation at this stage can be applied only for individual courses and not subscriptions.) Zapier is a tool that allows you to connect apps you use every day to automate tasks and save time.
1. Either create a Zapier account [by following steps (a) and (b) of this article] or log in to your existing one.
2. You can create your own workflow by connecting two apps together.
2.a. Select PayPal as the first app for this automation
2.b. Then select LearnWorlds, as the connected app.
2.c. Select the trigger, for example when a Successful Sale is made in your PayPal account.
2.d. Now select an action for this trigger, for example, Enroll User in Product.
2.e. You can now Make a Zap by clicking on the Try it button!
Note: We suggest using the Enroll User in Product so that Zapier will automatically create a new user in your school and enroll him in the course in a single step. If the user is already registered with the same email, Zapier will bypass the user creation step!
3. As soon as you select both Trigger and Action, click on Try it, and in the sequential window Continue.
4. Zapier will then prompt you to visit your PayPal IPN settings to add a URL as the IPN URL. You can do so, by (1) clicking on the Copy to clipboard and (2) clicking on the PayPal IPN settings link.
5. Once you’re redirected and login into your PayPal account, navigate to Seller Tools → Instant Payment Notifications and click Update.
6. Click the Choose IPN Settings button.
7. Paste the copied IPN URL, select the Receive IPN messages, and hit Save!
8. PayPal is now configured to trigger, let’s get back to our “Zap” to define LearnWorlds’ action, by selecting Test Trigger first (Zapier will make a sample sale), and after the successful test, click Continue.
9. Next, you’ll be prompt to enter the Action Event (Enroll User in Product) and your LearnWorlds credentials when clicking on the Continue button.
10. The next step in Zapier will be to set enrollment details. To use variables for each required field, select the Enter text or insert data.
11. Fill in the Email, First Name, and Last Name variables.
12. In the Product Field and from the drop-down menu, you can select the course (Product) that the learner chose to enroll in.
13. In the next fields, you may enter a different Price, choose to send a Welcome Email or not, and change the Transaction ID for your records (e.g. "Added via Zapier").
The Transaction ID record will reflect in this field, under your Sales records:
If the user is manually enrolled in the course by the admin, the field is assigned the value Added by the admin. The same value is assigned if the user was enrolled via Zapier if the Transaction ID in the Zap is blank.
14. After clicking Continue, all it is left is to test your Zap!
Tip: The "Number 1" variable entered in a previous step, returns an error on testing but there is no need to worry:) Feel free to skip the test and the Zap will work properly!
14. If you complete the test, a test user will be created and enrolled in your course, and you will have received the following confirmation screen:
Enroll user to a product via API
What about automating the enrollment procedure with our API? Here is the procedure on how to enroll a user in a product (available in the Learning Center plans or higher).