Sell courses via Stripe in your MoodleCloud site

Modified on Wed, 25 Feb at 7:02 PM

Stripe is now available on select MoodleCloud plans for you to accept course payments through a modern, seamless payment experience, with flexible payment options. 



Before a learner can participate in your courses, they must first be added to your site (Authentication). Once they have access, you can offer several ways for them to join a class (enrolments). The pre-installed Stripe payment gateway uses the enrolment on payment method. 



The Stripe payment gateway plugin is included in MoodleCloud Small, Medium and Standard plans only. You can change your plan in the MoodleCloud Customer Portal



Setting up Stripe payments for courses in your MoodleCloud site


Step 1 - Your Stripe account

You will need an active Stripe account, visit stripe.com to set one up.

  • API Keys: You will need the API Publishable Key and Secret Key from your Stripe account. 
  • Testing: Use your Stripe 'Test' keys from your Stripe Sandbox first. Switch to 'Live' keys when you are ready to accept payments.
  • Finding keys: These are on your Stripe Dashboard. If they aren't visible, look under the 'Developers' menu or use the 'Workbench' located in the toolbar at the bottom of your Stripe account page.



Step 2 - The Stripe payment gateway

In MoodleCloud, the Stripe payment gateway should be enabled by default. To verify this or set optional surcharges, navigate to Site administration > Plugins > Payment gateways > Manage payment gateways.

Manage payment gateway page highlighting link to Stripe gateway plugin settings



Step 3 - Configuring Payment Accounts

To connect your MoodleCloud site to your Stripe account:

  1. Navigate to Site administration > General > Payments > Payment accounts.
  2. A default 'Stripe Payment' account is ready for you to configure.
    • When required, more payment accounts can be created via 'Create payment account'. 
  3. Click on the relevant Stripe Payment gateway link to configure the connection: 


    Payment Accounts page highlighting link to configure Stripe payment account

  4. In the payment account configuration page:
    • Keys: Enter your API Publishable Key and Secret Key.
    • Payment Methods: Select the payment methods you wish to offer your learners (refer to Stripe's availability below)*
    • Tax and Billing: Configure these details where applicable (ensure your business details are also set in your Stripe account).
    • Payment Type: choose between One Time or Subscription.
    • Other options as required.
  5. Set the account to 'Enable' when you are ready.

    New Stripe payment account configuration page highlighting required API keys


* Note: Stripe's availability requirements - Stripe uses dynamic checkout, availability of payment buttons depends on your Stripe account's country, the course currency, your learner's location, and whether the payment method supports one-time or subscription payments.
For more details about what is supported, visit the Stripe Payment Gateway plugin documentation.


Step 4 - Enabling Enrolment on payment 

Go to Site administration > Plugins > Enrolments > Manage enrol plugins, and enable 'Enrolment on payment'. This must be enabled site-wide before you can add it as an enrolment method within individual courses.



Step 5 - Enabling Stripe payment in your courses

Go to the course you want to enable Stripe payments in. 

  1. In the course menu, navigate to Participants > Enrolment methods (from the dropdown menu).
  2. Select Add method > Enrolment on payment
  3. Complete the setup: name the instance (e.g. "Your Course - Enrolment"), select the relevant Payment Account, and set your price, currency, etc.
    Tip: You can add multiple 'Enrolment on payment' instances to a course if you want to offer different pricing tiers, currency or payment accounts.

    Enrolment on payment settings in a course


Step 6 - What your learners will see

To test the learner's experience, create a test user and log into your site. 


  1. Access the course: The learner clicks on the course name and sees a prompt to pay for course enrolment.
    Learner view of the course enrolment page showing the Stripe payment option
  2. Payment selection: They click to proceed to payment methods.

    Select payment type page, showing Stripe selected
  3. Dynamic Checkout: Stripe displays the valid payment buttons based on the currency and the learner's location. Select the payment method and click 'Pay' to proceed to the payment page, where the learner can enter their card details or be redirected to the relevant app or website to authorise the transfer.

    Note: If no payment options display or an error occurs at this screen, check that your configuration in Step 3 meets Stripe's availability requirements.

    The payment selection page, showing the course amount and list of payment method options to choose from

  4. Instant Enrolment: Once payment is confirmed, the learner is instantly enrolled and redirected back to the course to begin learning. 




Additional resources:



*If you experience any issues or errors, please Contact the MoodleCloud Team via the Help Widget in your portal.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article