tr Skip to content

When a successful payment is received in PayForm, enroll the customer into a LearnDash course

After a successful PayForm payment, FlowMattic creates a WordPress account for the customer and enrolls that account into a LearnDash course, so paying for a course on a PayForm form gives the buyer access.

PayForm WordPress LearnDash

3 steps Setup ~5 min Used on 810 sites Free to import

The When a successful payment is received in PayForm, enroll the customer into a LearnDash course workflow on the FlowMattic canvas, with 3 steps across PayForm, WordPress, LearnDash
The workflow as it appears in the builder after import. Each step opens for editing.

What this workflow does

Selling a course through a PayForm payment form is simple, but the buyer still needs a WordPress login and a LearnDash enrollment before they can start. This workflow does both right after the money comes in, so nobody has to create accounts by hand after each sale.

The PayForm Succesful Payment trigger fires when a payment is successfully processed. FlowMattic passes the payment data, including the customer's details, to the next steps. Run a test payment to see which values PayForm sends.

The WordPress New User step creates an account on your site. It ships unmapped, so after import you map the customer's details from the payment, such as the email address and name, into it. If the payer's email is already registered, WordPress keeps the one existing account rather than making another, and Task History lists the user ID that came back from the step.

The LearnDash Enroll Into Course step is already wired to the user ID from the New User step. You choose the course to enroll buyers into after import. Every successful payment runs all three steps, whatever the payment was for.

Selling one course with a payment form

A yoga teacher sells a single LearnDash course through a PayForm form on her site. Buyers get a WordPress account and course access once their payment succeeds.

Course access for returning buyers

A customer who already has an account pays for a new course. The New User step returns their existing user ID, and LearnDash enrolls that account.

Workshops paid outside WooCommerce

A training company without a full store takes payments for a workshop with PayForm and enrolls each payer into the matching LearnDash course.

How this workflow runs

What happens at each step once the workflow is on, and what you need before you import it.

  1. Step 1Trigger
    PayForm Succesful Payment

    Starts the workflow when PayForm successfully processes a payment. The payment and customer details are made available to the WordPress and LearnDash steps.

  2. Step 2Action
    WordPress New User

    Adds a new user account on your WordPress site for the payer. Nothing is mapped in the template, so map the payer's details from PayForm into the account. An email that is already registered doesn't get a second account.

  3. Step 3Action
    LearnDash Enroll Into Course

    Enrolls the WordPress user from the previous step into a LearnDash course. The user ID is already mapped from the New User step; pick the course after import and test with one payment.

What you need

  • FlowMatticCore
  • PayForm AccountAccount
  • LearnDash PluginPlugin

After importing, map your own data. To keep the template universal, not every step is pre-filled. Open each step in the builder and connect your accounts and fields (channels, lists, sheets, recipients) before you switch the workflow on.

Make it yours

Changes worth making after you import it.

  • If you sell several courses through different PayForm forms, put a Filter between the Succesful Payment trigger and the New User step that continues only for this course's form, and copy the workflow for each other course.
  • Add an Email step at the end that sends the buyer their login details and a link to the course, so they know where to start.
  • Make a test payment with an email that already has an account, then check Task History to confirm the Enroll step used that existing user ID.

Questions about this workflow

What if the PayForm customer already has a WordPress account?

WordPress won't create a second account for an email that's already registered. The New User step returns that existing user's ID, and the LearnDash step enrolls that account. Task History shows which user ID came back.

Which LearnDash course are buyers enrolled into?

The one you pick in the Enroll Into Course step after import. Only the user ID is preset in the template, so every payment enrolls into the course you choose there.

Does every PayForm payment start an enrollment?

Yes, every successful payment runs the workflow. If one PayForm account also takes payments for other things, add a Filter on the form between the trigger and the New User step.

Do I need LearnDash on the same WordPress site?

Yes. The account is created on the site where FlowMattic runs, and the LearnDash step enrolls that user into a course on the same site.

Import this workflow into your WordPress site

Download the JSON, import it from the Workflows screen and connect your accounts. Every run stays on your server, with no per-task fees.

30-day money-back guarantee Unlimited workflows and runs Self-hosted

Customers who run it every day

Rated 4.8 out of 5 by customers
Read more reviews

It's very straightforward, has a lot integrations and they work well. It is one thing to 'integrate' new external software, but integrating it well, with lots of options is where FlowMattic shines.

Koen A.

Works within WordPress, so it can easily access any inbuilt WP functions or custom functions and use them in your flow. It's easy to use and already has many useful integrations built.