Integrate Learnyst with Razorpay

If a learner who is already registered purchases a course, we can set up a workflow to automatically enroll them in that course. 

  1. Sign up on Pabbly and create a workflow
  2. Set up Webhooks on Razorpay
  3. Creating a Payment Page and Capturing a Payment
  4. 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.

    pab1
  • Click Create Workflow to set up a series of actions and triggers for automating processes.

    pab2
  • Enter the Workflow name and let the default folder be Home itself. Click Create.

    pab3
  • For the first Trigger Application choose Razorpay.

    pab5
  • Next, add the trigger event of Payment Captured.

    pab6
  • 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.

    pab7
  • Click on Add New Webhook. Paste the copied URL in the Webhook label.

    pab8
  • Now select the payment.captured from the Active Events section, and then click on the Create Webhook button to save it.

    pab-9
  • 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.
    pab10-1
  • Click on Create Payment Page to create a new Payment Page.

    pab10
  • Add necessary form details like course name, email, phone number etc.

    pab11
    pab12
  • Open the URL and complete the payment.

    pab13
  • 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.

    action-1
  • Add the Action Event as Paid Enrollment

    action-2
  • Click on Connect and add a new connection.

    action-3action-5
  • For the School ID, simply navigate to the Pabbly Settings, Marketing > App Integration > Pabbly > Settings.

    action-6action-7
  • Similarly for the API key, navigate to Marketing > App Integration > Pabbly > Settings.

    action-9
  • Then, within Pabbly, in the email field link the email address received from the payments page webhook response.

    action-11
  • Similarly, for the course title link the course name from the webhook response.

    action-10
  • Click on Save and Send Test Request.

    action-13
  • After completing this step, you can view the enrollment status or transaction details of the user by checking reports.

    action-14

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.