Moolre Documentation

Step-by-step guides

Payment links, checkout and POS

Hosted payment links, the JavaScript checkout embed, Payment IDs and the Web POS: which to use and how to confirm payment safely.

Three ways to take a payment without building a prompt screen

Mobile Money Collection gives you full control: you build the screen, the OTP step and the status page. When you would rather not build that, Moolre can host it for you. Pick the option that matches how your customer arrives.

OptionBest forYou buildResult
Payment link (hosted page)Online stores, invoices you send by message, one-off requestsOne server call and a redirectThe customer pays on a Moolre-hosted page (Web POS) and returns to your site
Checkout embed (JavaScript inline)A checkout inside your own pageA script tag or the @moolre/moolrejs package, plus a server call to confirmA Moolre checkout opens over your page
Payment IDCustomers who pay later by USSD, or pay in personOne server call per customer or per orderA short ID the customer pays to from their phone
Web POSStaff taking payments at a till, from the dashboardNothing: staff use the Moolre Web POSPayments settle into your wallet

Step by step: the checkout embed

The JavaScript inline checkout opens a Moolre payment window on top of your page, so the customer never leaves your site.

  1. Create the order on your server with a unique externalref.
  2. On the page, load the checkout with the @moolre/moolrejs package or the browser CDN script, passing your public key, the amount, the currency and the externalref. Only the public key goes to the browser.
  3. The customer completes the payment in the window.
  4. On your server, confirm the payment with Payment Status (never trust the browser callback alone) or wait for the webhook, then fulfil the order once.

Public key only in the browser

The public key can start collections but cannot move money out. The private key, VAS keys and your wallet secret must never reach a browser.

Step by step: a Payment ID

A Payment ID lets a customer pay later or in person by USSD, without a screen of yours.

  1. Call Create Payment ID with your public key: type 2, the customer phone (+233 format), name, currency, an optional amount, a unique externalref and your accountnumber.
  2. Give the customer the returned ID. They dial *203*<paymentid># (in the sandbox *203*6000*<paymentid>#) and pay to it.
  3. Read the payments made against it with List Payment ID Transactions, or receive the payment webhook.
  4. Check the state of the ID itself with Payment ID / Bank Account Status.

Web POS for staff

The Web POS is the Moolre page staff use to take a payment at a till: enter the amount, the customer approves on their phone, and the money settles into your wallet. It needs no code. Payment links open the same Web POS, so a staff member and an online customer both end up in the same reconciled wallet.

  1. Open the Web POS from the Moolre app with the wallet you want to collect into.
  2. Enter the amount and the customer's phone number and send the request.
  3. Confirm in the app, or on your statement, that the payment arrived before handing over goods.

Checklist

  • Every link or checkout has a unique externalref stored before it is created.
  • You fulfil from a verified webhook or from Payment Status, never from a redirect or a browser callback.
  • Only the public key is ever in a browser.
  • Expired and unpaid links leave the order pending, then cancelled by your own rules.
  • You reconcile paid orders against the account statement.