Short answer: install the free Whop plugin for Moodle, add your Whop API key, company ID and webhook secret to a payment account, and price your course in a currency such as USD or EUR. Learners pay on Whop’s checkout with their card, Apple Pay, Google Pay or PayPal, and Moodle enrols them once Whop confirms the payment.
Why Whop for course payments?
Whop is a merchant of record: it sells to your learner on your behalf, takes the payment, issues the receipt and can collect sales tax, then pays you out. That matters in two cases:
- You are in a country Stripe and PayPal do not serve as a merchant. Whop pays out to sellers in a long list of countries, Algeria among them, so a training centre there can sell to buyers abroad in dollars or euros.
- You do not want to deal with tax and chargebacks yourself. Whop handles the payment side; you handle the course.
The trade-off is cost: on top of card fees Whop charges for international cards and currency conversion. Check Whop’s pricing for your case.
What do you need?
| You need | Where to get it |
|---|---|
| Moodle 4.5 to 5.3 | Your site, as administrator |
| A Whop account | whop.com, plus the sandbox for testing |
| The Whop plugin for Moodle | github.com/devlms/moodle-paygw_whop, free and open source (GPL) |
Step 1: get your keys from Whop
Start in the sandbox: it is a separate copy of Whop with its own account and keys, where no money moves.
- API key: in the dashboard, open the Developer page and create a company API key.
- Company ID: it starts with
biz_and appears in your dashboard’s address. - Webhook secret: under Developer, create a webhook with the address
https://your-moodle-site/payment/gateway/whop/webhook.php, choose the payment.succeeded and payment.failed events, and copy the signing secret. It starts withws_.
Step 2: install the plugin
- Download the latest release from the plugin’s releases page and unzip it into
payment/gateway/whop, or upload the zip in Site administration > Plugins > Install plugins. With the DevLMS payment hub, press Activate next to Whop instead. - Visit Site administration > Notifications to finish the upgrade.
- Enable Whop in Site administration > Plugins > Payment gateways > Manage payment gateways.
Step 3: add the keys to a payment account
In Site administration > Payments > Payment accounts, open an account and choose Whop. Choose Sandbox, paste the API key, the company ID and the webhook secret, then enable it.
Step 4: price a course
Enable Enrolment on payment, add it to the course, choose the payment account and set the price in a currency Whop settles, such as USD, EUR or GBP.
Step 5: test, then go live
As a test learner, open the course, choose Pay, then Card or wallet (Whop). On Whop’s sandbox checkout, pay with the card number 4242 4242 4242 4242, any future date and any CVC. Back in Moodle, the learner is enrolled and the payment appears in Site administration > Reports > Payments.
To go live, create the same three things in your live Whop dashboard (API key, company ID, webhook), then switch the payment account to Live with the live values.
How is each payment checked?
- Card details stay on Whop’s page; your Moodle never sees them.
- A webhook only makes the plugin ask Whop’s API about the payment. The webhook itself must carry a valid signature and a recent timestamp.
- The payment must belong to the checkout the plugin created, be paid, and be at least the course price in the course’s currency.
- Each payment is delivered once, even if the webhook and the learner’s return arrive together.
Selling locally and internationally
If you also take local payments, such as EDAHABIA and CIB cards in Algeria with Chargily Pay, the DevLMS payment hub shows both at one checkout, each with its own price and currency.
Common problems
| Problem | What to check |
|---|---|
| Whop is not in the payment window | Whop is enabled in Manage payment gateways and in the account, and the course price is in a supported currency |
| The learner paid but is not enrolled | The webhook exists in the same Whop environment (sandbox or live) as the keys, points to your site, and includes payment.succeeded. “Check again” on the return page reads the payment once Whop has sent it |
| ”Enter the webhook signing secret” when saving | Paste the secret exactly as Whop shows it, starting with ws_ |
Need subscriptions, bundles or a different provider? See all payment guides or ask us for a fixed price.