Short answer: install the free SofizPay plugin for Moodle, paste your SofizPay merchant account into a payment account, and price your course in dinars. Learners pay with a CIB bank card or an EDAHABIA card on the SATIM payment page, and Moodle enrols them as soon as SofizPay confirms the order.
This guide covers the setup, sandbox first, and what to check before taking real payments.
Who is this for?
Anyone running Moodle who sells courses to learners in Algeria: training centres, schools, independent teachers, companies. Online card payments in Algeria go through SATIM, the interbank network behind CIB cards and Algérie Poste’s EDAHABIA card, and they settle in dinars (DZD) only.
SofizPay is an Algerian payment company that gives merchants a payment link to the SATIM page. The merchant is identified by a public account key, so there is no secret key to store in Moodle.
What do you need?
| You need | Where to get it |
|---|---|
| Moodle 4.5 to 5.3 | Your site, as administrator |
| A SofizPay merchant account | sofizpay.com. The sandbox works for testing; live payments need the account approved |
| The SofizPay plugin for Moodle | github.com/devlms/moodle-paygw_sofizpay, free and open source (GPL) |
| A course to sell | With the Enrolment on payment method, or anything else in Moodle that takes payments |
Step 1: find your merchant account
Sign in to SofizPay and copy your merchant account: a 56-character key that starts with G. It is public, like an account number, so it is safe to paste into Moodle. The plugin checks every payment against it and refuses any payment that went to another account.
Step 2: install the plugin
- Download the latest release from the plugin’s releases page.
- Unzip it into
payment/gateway/sofizpayin your Moodle folder (or use Site administration > Plugins > Install plugins and upload the zip). - Visit Site administration > Notifications and finish the upgrade.
If you use the DevLMS payment hub, open the hub’s Gateways page and press Activate next to SofizPay instead.
Step 3: enable SofizPay
Go to Site administration > Plugins > Payment gateways > Manage payment gateways and enable SofizPay.
Step 4: add your account to a payment account
- Go to Site administration > Payments > Payment accounts. Create an account if you have none.
- Next to SofizPay, choose the settings link.
- Set Environment to Sandbox.
- Paste your merchant account.
- Enable it and save.
There is no webhook to register in SofizPay: the plugin sends its webhook address with every payment.
Step 5: price a course in dinars
- Enable the Enrolment on payment method in Site administration > Plugins > Enrolments, if it is not already.
- In the course, go to Participants > Enrolment methods and add Enrolment on payment.
- Choose the payment account from step 4, set the currency to Algerian Dinar (DZD) and enter the price.
Centimes are kept: a price of 2500.40 DZD is charged as 2500.40 DZD.
Step 6: test a payment
Log in as a test learner, open the course and choose Pay. In Moodle’s payment window choose CIB or EDAHABIA card (SofizPay), then Continue to payment. You land on the SATIM sandbox page; pay with the test card from SofizPay’s developer documentation.
Back in Moodle, the plugin asks SofizPay for the order before doing anything. A paid test order enrols the learner and shows in Site administration > Reports > Payments. Try a declined card too: the learner sees that nothing was charged and can try again.
Step 7: go live
Once SofizPay approves your account, set Environment to Live in the payment account. Make one small real payment yourself before you announce it.
How does the plugin keep payments safe?
- Card details never touch your Moodle. Learners type them on the SATIM page.
- Moodle never trusts the redirect. Coming back from the payment page, or receiving a webhook, only makes the plugin ask SofizPay for the order.
- Webhooks are signed. SofizPay signs each one with its RSA key; the plugin rejects anything that does not verify.
- Status, account and amount must all match. An order is delivered only if SATIM reports it paid, to your merchant account, for at least the price.
- Each payment is delivered once, even when the return page and the webhook arrive at the same time.
What about learners abroad?
SATIM cards are Algerian and settle in dinars only. To also sell abroad, add an international gateway, such as Whop. The DevLMS payment hub shows both at one checkout, each with its own price and currency. See the payment hub.
Common problems
| Problem | What to check |
|---|---|
| SofizPay is not in the payment window | The gateway is enabled in Manage payment gateways, the account has SofizPay enabled, and the course price is in DZD |
| ”Enter your SofizPay merchant account” when saving | The account is 56 characters and starts with G. A secret seed starts with S: never paste that anywhere |
| The learner paid but is not enrolled yet | Open the return page again (“Check again”). The order is delivered on the first check where SATIM reports it paid |
| You need to refund | Refund from the SofizPay dashboard, then unenrol the learner in Moodle |
Need something more?
SofizPay is one of the Algerian payment providers we cover, next to Chargily Pay, and one of 238 worldwide in our payment providers list. If you need another gateway, an installment plan or payment wired to your own systems, ask us for a fixed price.