Vendra's M-Pesa integration connects your point of sale and accounting directly to Safaricom's mobile payment network. Customers pay by entering their PIN on their phone. Vendra receives confirmation automatically and completes the transaction — no manual checks, no calling the cashier to verify an SMS.
M-Pesa integration in Vendra is specific to Kenya and the Safaricom network. It uses the Safaricom Daraja API and requires a registered Paybill number or Buy Goods till. Businesses outside Kenya should use Vendra's other payment methods.
What the M-Pesa integration does
The integration uses the Safaricom Daraja API to trigger an STK Push (SIM Toolkit Push) payment request directly to the customer's phone. The cashier initiates the request from the POS screen. The customer sees a prompt on their phone, enters their M-Pesa PIN, and the payment is confirmed. Vendra listens for the confirmation callback from Safaricom and automatically marks the POS order as paid.
This eliminates the main pain point of manual M-Pesa collection — cashiers do not need to wait for an SMS confirmation message from the customer, and there is no risk of accepting a fake or forwarded SMS. The payment is confirmed directly by Safaricom's API.
Setup — Paybill, Consumer Key, Consumer Secret
Before configuring M-Pesa in Vendra, you need the following from Safaricom's Daraja developer portal (developer.safaricom.co.ke):
- A registered Paybill number or Buy Goods till number linked to your business
- A Daraja API app with STK Push (Lipa na M-Pesa Online) enabled
- The Consumer Key for your Daraja app
- The Consumer Secret for your Daraja app
- Your Daraja passkey (provided in the Daraja portal after app activation)
Once you have these credentials, go to Accounting → Configuration → Payment Acquirers → M-Pesa in Vendra. Enter your Paybill number, Consumer Key, Consumer Secret and passkey. Save the configuration. You also need to whitelist your Vendra callback URL in the Daraja portal — this is the URL Safaricom sends the payment confirmation to. Your callback URL is shown on the M-Pesa configuration page in Vendra.
How STK Push works at the POS
Once M-Pesa is configured and added as a payment method on your POS terminal, the flow at checkout is as follows:
1. Cashier selects M-Pesa
After adding all products to the order, the cashier clicks Payment. On the payment screen, they select M-Pesa STK Push as the payment method.
2. Enter the customer's phone number
The cashier enters the customer's M-Pesa registered phone number in the format 2547XXXXXXXX (the international format for Kenyan numbers). The amount is pre-filled from the order total.
3. Send the STK Push request
The cashier clicks Send Request. Vendra calls the Safaricom Daraja API, which triggers an STK Push notification to the customer's phone number. The customer sees a prompt on their phone showing the Paybill name, the amount and an input field for their M-Pesa PIN.
4. Customer authorizes the payment
The customer enters their M-Pesa PIN on their phone and confirms. This happens entirely on the customer's device — the cashier does not need to touch anything.
5. Automatic confirmation
Safaricom sends a callback to Vendra confirming the payment. The POS status updates automatically to Confirmed. The cashier clicks Validate to complete the transaction and issue the receipt.
Payment confirmation callback
The callback is the mechanism by which Safaricom notifies Vendra that a payment has been made. When a customer enters their PIN and the payment goes through, Safaricom sends a POST request to your Vendra callback URL with the transaction details — M-Pesa transaction ID, phone number, amount and timestamp.
Vendra receives this callback, matches it to the waiting POS order, updates the payment status to confirmed and records the M-Pesa transaction reference. The entire process typically takes between 10 and 30 seconds from the time the customer confirms on their phone.
For the callback to reach Vendra, your Vendra URL must be publicly accessible (not behind a local network firewall) and the callback URL must be registered in the Daraja portal. Vendra's IT or onboarding team can assist with this if needed.
M-Pesa on Sales invoices
M-Pesa is not limited to POS. From any posted customer invoice in Accounting → Customers → Invoices, you can register a payment using the M-Pesa journal. This covers the scenario where a customer pays a sales invoice directly via M-Pesa transfer to your Paybill, outside of the POS terminal.
Click Register Payment on the invoice, select the M-Pesa journal, enter the payment date and amount, and optionally add the M-Pesa transaction reference in the memo field. Confirm the payment. The invoice is marked paid and the M-Pesa journal reflects the receipt.
Reconciliation in Accounting
Every M-Pesa STK Push confirmed in Vendra creates a payment record in the M-Pesa journal. To reconcile against your Safaricom M-Pesa statement:
- Download your M-Pesa statement from the M-Pesa Manager portal (for Paybill holders)
- Go to Accounting → Accounting → Bank Statements
- Create a new bank statement for the M-Pesa journal and import or manually enter the statement lines
- Vendra automatically suggests matches between statement lines and the M-Pesa payment records created by STK Push
- Review and confirm matches — any discrepancies (payments recorded in M-Pesa statement but missing from Vendra, or vice versa) are flagged for investigation
- Mark the statement reconciled when all lines are matched
STK Push at POS
Cashier enters phone number, customer receives push notification, PIN confirmation triggers automatic payment completion in Vendra.
Invoice payments
Register M-Pesa payments against any customer invoice manually. Useful for transfers made directly to your Paybill outside of POS.
Automatic journal entries
Every confirmed M-Pesa payment creates an accounting entry automatically. No manual bookkeeping needed for mobile money receipts.
Collections report
The M-Pesa module transactions view shows all payments by date, phone, amount and status. Filter and export for reconciliation or audit.
Failed transactions
A transaction can fail or remain pending for several reasons: the customer does not respond to the push, they enter the wrong PIN, they have insufficient M-Pesa balance, the Safaricom network times out, or the customer cancels the request.
Failed and timed-out transactions appear in the M-Pesa Transactions log (M-Pesa → Transactions) with a status of Failed or Cancelled. The associated POS order remains open and unpaid. The cashier has two options:
- Select M-Pesa again and resend the STK Push to the same or a different phone number
- Switch to a different payment method (cash, card or bank) to complete the sale
Failed transactions do not create any accounting entries. They are recorded in the log for audit purposes only.
M-Pesa collections report
The M-Pesa Transactions view (M-Pesa module → Transactions) is the primary report for mobile money activity. Each row shows the transaction date, customer phone number, amount, status and the linked POS order reference.
Filter by date range, status or company to see all confirmed payments for a period. Export the list to Excel or CSV for reconciliation with your Safaricom M-Pesa statement. The total of all Completed transactions for a period should match the corresponding lines on your Safaricom M-Pesa statement.
For a higher-level view, Accounting → Reporting → Invoice Analysis filtered to the M-Pesa journal shows revenue collected via M-Pesa across both POS and invoice payments.