# Connect M-Pesa (Kenya) | ModulawAI

> Let clients pay KES invoices from their phone, through your own Paybill or Till and your Daraja app.

Web page: https://modulaw.ai/support/connect-m-pesa/  
Last updated: 2026-11-03

Clients in Kenya can pay KES invoices from their phone. They enter their number on the invoice page, approve the prompt on their phone, and the payment goes to your firm’s own Paybill or Till. ModulawAI records it once M-Pesa confirms it.

You need the **Payment accounts** permission. Owners have it; an admin can give it to others under **Account and settings**, **Workspaces**: open your workspace and choose **Permissions**. Connecting, changing or removing it asks for a fresh code from your authenticator app. See [Confirming changes with your authenticator app](https://modulaw.ai/support/confirm-with-your-authenticator-app/).

## Before you start

- A Paybill or Till (Buy Goods) number in your firm’s name.
- An app on [developer.safaricom.co.ke](https://developer.safaricom.co.ke) (Daraja) linked to that number, with Lipa na M-Pesa Online enabled. From it you need the **consumer key**, **consumer secret** and the **Lipa na M-Pesa passkey**.
- Your KES office account added under [Bank accounts](https://modulaw.ai/support/your-firms-bank-accounts/).

## Connect

1. Go to **Settings**, then **Financials**, then **Payment providers**.
2. In the M-Pesa card, enter your **Shortcode** and choose the **Shortcode type**: Paybill or Till (Buy Goods).
3. Enter the **Consumer key**, **Consumer secret** and **Lipa na M-Pesa passkey**.
4. Choose the **Environment**: Sandbox (testing) to try it with Safaricom’s test numbers, or Production for real payments.
5. Choose the **Settlement account**: the KES office account the Paybill or Till pays into.
6. Choose **Connect M-Pesa** and enter the code from your authenticator app. ModulawAI checks the details with Daraja and stores them encrypted.

## Payments made straight to your Paybill

Some clients pay your Paybill directly from their phone menu. Those payments appear in **Financials**, **Statements** for your settlement account, with the invoice suggested from the account number the client typed. Check and record them there. See [Bank statements and reconciliation](https://modulaw.ai/support/bank-statements-and-reconciliation/).

## Fees and client money

M-Pesa charges are taken from the payment, so it is for fees only. Ask clients to pay client money into your trust account by bank transfer.

## Disconnecting

Choose **Disconnect** to stop phone prompts for KES invoices. Your Paybill or Till is not affected.

---

ModulawAI is the AI operating system for legal practice. Site index for AI assistants: https://modulaw.ai/llms.txt. Book a demo: https://app.modulaw.ai/book-demo
