If a learner who is already registered purchases a course, we can set up a workflow to automatically enroll them in that course.
- Sign up on Pabbly and create a workflow
- Set up Webhooks on Razorpay
- Creating a Payment Page and Capturing a Payment
- Adding Action application on Pabbly
Step 1: Sign up on Pabbly and create a workflow:
- Go to pabbly.com and click Sign Up to create an account.
-
Click on Access Now on the Pabbly Connect card.
- Click Create Workflow to set up a series of actions and triggers for automating processes.
- Enter the Workflow name and let the default folder be Home itself. Click Create.
- For the first Trigger Application choose Razorpay.
- Next, add the trigger event of Payment Captured.
- A webhook URL will be generated, click Copy.
- Next, we have to capture a webhook response to ensure that for the action of payment captured the details are getting fetched.
Step 2: Set up Webhooks
- Login to your Razorpay account and navigate to webhooks section available under Account and Settings.
- Click on Add New Webhook. Paste the copied URL in the Webhook label.
- Now select the payment.captured from the Active Events section, and then click on the Create Webhook button to save it.
- Next again go to pabbly and click on capture webhook response.
In order to capture a webhook response, we will make a test payment for the user details to be saved. To achieve this, you can create a Payment Page within Razorpay.
Step 3: Creating a Payment Page and Capturing a Payment:
- Click Payment Pages under the Payment Product label.
- Click on Create Payment Page to create a new Payment Page.
- Add necessary form details like course name, email, phone number etc.
- Open the URL and complete the payment.
- Upon payment completion, Pabbly will receive the details provided during the payment process.
Step 4: Adding Action application on Pabbly:
When a specific trigger occurs, there is a corresponding action that takes place. For this action, we will integrate Learnyst as our chosen application.
- Choose the Action application by searching for Learnyst.
- Add the Action Event as Paid Enrollment.
- Click on Connect and add a new connection.
- For the School ID, simply navigate to the Pabbly Settings, Marketing > App Integration > Pabbly > Settings.
- Similarly for the API key, navigate to Marketing > App Integration > Pabbly > Settings.
- Then, within Pabbly, in the email field link the email address received from the payments page webhook response.
- Similarly, for the course title link the course name from the webhook response.
- Click on Save and Send Test Request.
- After completing this step, you can view the enrollment status or transaction details of the user by checking reports.
NOTE:
You need to add a filter for the course name otherwise the user can enter any course name and still get enrolled for the same amount.