Enrolment: Stripe Payment with SCA and Coupon

Maintained by Picture of DualCube TeamDualCube Team
Now avail the much-awaited coupon functionality while enrolling students in Moodle courses using a Stripe payment gateway for paid courses with Strong customer authentication (SCA). Stripe Receipt sent to customers for any successful transaction. This plugin will help the admins and webmasters to offer their students a percent-off or amount-off discount for the paid courses. This plugin helps admins and webmasters use Stripe as the payment gateway.
678 sites
39 fans
Current versions available: 2

Stripe Payment: 

Introducing the newest offering from Team Dualcube: Stripe Payment!

Now avail the much-awaited coupon functionality while enrolling students in Moodle courses using Stripe payment gateway for paid courses with Strong customer authentication (SCA).

This plugin will help the admins and webmasters to offer their students a percent-off or amount-off discount for the paid courses.

Stripe Payment:

1. Registered users can login to the Moodle site and happily apply the promo codes for a discount before payment. On successful payment, they can access the course.

2. Admins and Webmasters, now, can create, manage and keep track of all promotional codes directly in their Stripe dashboard.

3. Strong customer authentication (SCA) implemented with 4 layers of complex security to comply with EU Revised Directive on Payment Services (PSD2) on payment service providers within the European Economic Area.

4. The first of it's kind to use Payment intent method for Stripe-coupon. 

5. Works with all stable versions of Moodle till v 3.8.1

6. Latest Stripe SDK

Stripe Payment Documentation:

This plugin has all the settings for development as well as for production usage. Its easy to install, set up and effective.

Creating Merchant Account :

1) Create account at https://stripe.com.

2) Complete your merchant profile details from https://dashboard.stripe.com/account.

3) Now set up secret key and publishers key at https://dashboard.stripe.com/account/apikeys.

4) For test mode use test api keys and for live mode use live api keys.

Now you are done with merchant account set up.

Installation Guidance : 

Login to your moodle site as an “admin user” and follow the steps.

1) Upload the zip package from Site administration > Plugins > Install plugins. Choose Plugin type 'Enrolment method (enrol)'. Upload the ZIP package, check the acknowledgement and install.

2) Go to Enrolments > Manage enrol plugins > Enable 'Stripe' from list

3) Click 'Settings' which will lead to the settings page of the plugin

4) Provide merchant credentials for Stripe. Note that, you will get all the details from your merchant account. Now select the checkbox as per requirement. Save the settings.

5) Select any course from course listing page.

6) Go to Course administration > Users > Enrolment methods > Add method 'Stripe' from the dropdown. Set 'Custom instance name', 'Enrol cost' etc and add the method.

Adding coupons:

Go to your Stripe Dashboard >  Billing > Coupons > Create a coupon.

Type in the coupon’s name: it can be anything and for your reference only.
Type in the Coupon’s ID : This is the Coupon code which your students will need to enter if they want to avail the discount.

Choose Coupon Type: 
1. Percentage discount : offers % off on the course price 
2. Fixed amount discount : Offers a fixed amount off on the course price.

Duration: For duration, when using the value repeating, also specify duration in months as the number of months for which the coupon should repeatedly apply. Otherwise the coupon can be set to apply only to a single invoice or to them all.

Redemption : The max_redemptions and redeem_by values apply to the coupon across every customer you have. For example, you can restrict a coupon to the first 50 customers that use it, or you can make a coupon expire by a certain date. If you do the latter, this only impacts when the coupon can be applied to a customer. If you set a coupon to last forever when used by a customer, but have it expire on January 1st, any customer given that coupon will have that coupon’s discount forever, but no new customers can apply the coupon after January 1st.

If a coupon has a max_redemptions value of 50, it can only be applied among all your customers a total of 50 times, although there’s nothing preventing a single customer from using it multiple times. (You can always use logic on your end to prevent that from occurring.)


This completes all the steps from the administrator end. Now registered users can login to the Moodle site and view the course after a successful payment of the discounted price. 


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4


Picture of DualCube Team
DualCube Team (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Picture of Formation ornitho Natagora
    Tue, Apr 23, 2019, 10:50 PM
    Have you read about "PSD2: Strong Customer Authentication - Stripe" (check on Stripe website)? Some changes are due before September 2019...
    Are they planed (or already done) in this plugin?
    Thank you!
  • Picture of Syafiqah Salleh
    Tue, May 7, 2019, 11:56 AM
    is the plugin can be use in Malaysia?
  • Picture of Patrik Lindqvist
    Wed, May 29, 2019, 8:36 PM
    Hi Dualcube
    THIS IS NOT OK!!!! You did a custom job for me adding coupons to the stripe payment plugin and future updates was included in the cost. Admin of dualcube now says that i need to pay for future updates every time. It´s really a pity you treat customers like this. For me when a deal is made i honor it but it seems like you only honor cash and no pride in made agreements.
  • Picture of DualCube Team
    Mon, Jun 3, 2019, 7:37 PM
    Dear Patrik,
    We offer free services to anyone using our free plugins that are on Moodle.org because that is our responsibility and within our power.
    If anyone is using a customized version i.e a premium version of that plugin, we cannot take the responsibility for it to be working with every upcoming moodle version. But we, still, updated your customized plugin for a long time. But, this can not go on forever. We can not and should not entertain every unjustified claim because it would seriously damage the very foundation of the eLearning development world. We always abide by the standard laws of the same industry.

    Thank you.
  • Picture of Patrik Lindqvist
    Mon, Jun 3, 2019, 9:11 PM
    You did a custom job and in the agreement there was future updates to the plugin. After a lot of arguing you did correct one error which was supposed to be in the live version from the start and also here you wanted money to correct this error. After that you want more money for the coming updates which was included in the first agreement. So NO you still havent updated the plugin even once so dont say that you cant go on forever. It´s just bad business!
  • Picture of DualCube Team
    Mon, Jun 3, 2019, 9:25 PM
    Dear Patrik,
    This is not the place to argue such matters. We are dignified enough to answer to such false accusation. We do not want any of our users to suffer using our plugin and the same is applicable to you too. I earnestly request you not to spread lies or rather a misunderstanding just for a small personal gain. Please respect the platform or a lot of honorable users may suffer.
    Thank you.
  • Picture of Patrik Lindqvist
    Tue, Jun 4, 2019, 4:08 AM
    Of course its not the right place to communicate but i have tried to resolve this in anyway i can but you give me no explanation to why you breach our agreement? There is no personal gain for me i just want other to know how you work and dont hire you due to shady business you are doing. Get in the right direction and honor the agreement and i will of course not post here again and i really hope im the only one you are doing this to. Get real and put pride in your work!
  • Picture of Dana Alexandrescu
    Wed, Jun 26, 2019, 1:46 AM
    Is there a way to post to the Stripe the description of the instance name of the course it was purchased? Instead of just "Charge For Course Enrollment Cost"?
    It's hard to keep track in the Payments what course was paid for.
  • Picture of Andy Hill
    Sun, Jul 7, 2019, 9:04 PM
    Hi Guys, great plugin but ideally need this to work on moodle mobile, will there be any future release for supporting moodle mobile?
  • Picture of DualCube Team
    Thu, Jul 11, 2019, 2:53 PM
    Dear Andy,
    This should work on Moodle mobile too. Did you do the necessary settings noted on https://docs.moodle.org/31/en/Moodle_Mobile_guide_for_admins ?

    Thank you.
  • Picture of Andy Hill
    Fri, Jul 12, 2019, 8:07 PM
    Hi Guys, it doesnt seem to be working with Moodle Mobile. When the plugin is enabled and configuared for enrolment, it will show and process payment on the website but doesnt display the stripe enrolment method on the mobile. I currently use the paypal which displays the payment button in order for students to sign up with payment but no stripe at all. I am using the latest release of your plugin along with the latest release of the mobile app. I have checked the link and all is correct as per instructions.

    Any ideas?
  • Picture of DualCube Team
    Mon, Jul 15, 2019, 2:37 PM
    Dear Andy,
    It will be fixed with our next update. It will take some time as we are releasing updates for all of our plugins.
    Thank you.
  • Picture of Luis Quesada Romero
    Wed, Jul 17, 2019, 9:24 PM

    Hello, some form of each student may see a different tuition payment.
    I have created two methods, but the student sees both, some see that only see by role for example, or assign a type of enrollment to that student, thank you.
  • Picture of DualCube Team
    Thu, Jul 18, 2019, 2:57 PM
    Dear Luis,
    Can you please share the idea which you are trying to implement in detail? We can then assist you. And if you want to submit a custom development request, please email at suman.d@dualcube.com.

    Thank you.
  • Picture of Patrik Lindqvist
    Mon, Jul 22, 2019, 2:54 AM
    Dear Luis i dont recommend you to requet any custom work from Dualcube as they will not hold their agreement. They promised future updates with a coupon custom modification of the stripe plugin. But when i paid they wanted me to pay even more money for future updates. To present they have not made any updates as agreed so im stuck at Moodle 3.5 for a year now. Not recommended!
Please login to post comments