Vodacom M-PESA
Vodacom M-PESA lets your customers pay straight from their mobile money wallet. Powerlynx supports it in five markets: Tanzania, Mozambique, DR Congo, Lesotho and Ghana.
To set up Vodacom M-PESA in Powerlynx, ensure you've selected one of those countries under Config/System/Localization. The gateway only appears in the payment gateway list when your country matches.
Each market settles in its own currency, and the currency is not something you choose — Powerlynx derives it from your country and rejects payments in anything else:
| Market | Currency |
|---|---|
| Tanzania | TZS |
| Mozambique | MZN |
| DR Congo | USD |
| Lesotho | LSL |
| Ghana | GHS |
INFO
Mozambique runs on a different Vodacom platform than the other four markets. Powerlynx detects this from your selected country and adjusts the configuration form for you — you don't need to pick the platform yourself.
Configuration
Open Config → Finance → Payment gateways and click the action button next to Vodacom M-PESA.
You will need credentials from your Vodacom merchant account. For Tanzania, DR Congo, Lesotho and Ghana these come from the M-PESA OpenAPI developer portal; for Mozambique they come from the Vodacom Mozambique developer portal under Account → Profile. If you are unsure which credentials your account was issued, ask Vodacom merchant support before you start.
Fill in the following fields:
- Environment —
ProductionorSandbox. Use Sandbox only while testing; it settles no real money. - Market — the Vodacom market your merchant account belongs to: Tanzania, DR Congo, Lesotho or Ghana. This field is hidden for Mozambique accounts, because Mozambique is determined by your country setting alone.
- Service provider code — your merchant shortcode (the paybill or till number that receives customer payments).
- API key — the API key issued with your merchant account.
- Platform public key — the RSA public key Vodacom publishes for your environment. It is used to encrypt your API key on every request, so copy it exactly, including the header and footer lines.
Pay attention to the Location filter — you can configure your Vodacom M-PESA account as the default for the system (all locations use this account, so every payment collected across all locations goes to it), or select a specific location and link the account only to that one. This way different locations can collect into different merchant accounts.
Press Apply to save.
WARNING
Your country is recorded on the configuration at the moment you save it, and that recorded value is what the gateway uses afterwards. If you later change the country under Config/System/Localization, re-open the Vodacom M-PESA configuration and save it again so it picks up the new market.
Enable Payment Gateway for a Location
The next crucial step is to enable Vodacom M-PESA for a specific location. Navigate to Locations, select the desired location, and open the "Payment Gateways" tab. From there, enable Vodacom M-PESA for this location.
If it's disabled, your clients will not have the option to pay with Vodacom M-PESA.
Buying a voucher with Vodacom M-PESA
Vodacom M-PESA does not send your customer to a payment website. Instead, Powerlynx asks Vodacom to push a payment prompt to the customer's handset, and the customer approves it by entering their M-PESA PIN on the phone itself.
Because of this, the customer is asked for their phone number during checkout if Powerlynx does not already have one on file for them — that number is where the prompt is sent.
INFO
A phone number entered at that prompt is used for the payment only. It is sent to Vodacom to route the payment request and is discarded when the session ends — it is never saved on the customer's record.
After approving the prompt on the handset, the customer returns to Powerlynx. Payment confirmation does not depend on the customer's browser: Powerlynx checks the transaction status with Vodacom directly, so a voucher is issued even if the customer closes the page or loses signal right after paying.
Networking: Walled Garden
The payment prompt is delivered to the handset over the mobile network rather than through your Wi-Fi, but your hotspot still needs to let the Powerlynx pages themselves through.
/ip hotspot walled-garden
add dst-host=*.digitaloceanspaces.com
add dst-host=*powerlynx.app/ip hotspot walled-garden
add dst-host=*.digitaloceanspaces.com
add dst-host=*powerlynx.app