M-Pesa integration
M-Pesa payments, from any conversation.
Send an M-Pesa prompt to the customer’s phone from a chat, a call, a USSD menu or a workflow. They approve it with their PIN, and the money goes to your own paybill or till.
- Works as
- Action
- Market
- Kenya, in shillings, through Safaricom’s Daraja API.
- Connect with
- Your Daraja app’s consumer key and secret, business short code and passkey.
- Confirmed
- Each payment’s status is checked with Daraja.
Four ways to use it
Wherever the customer is.
In a chat
A M-Pesa prompt reaches the customer’s phone while the chat waits, and the flow carries on as paid or failed.
On a call
The caller approves the prompt while the call waits, then hears what happens next.
From a USSD menu
The prompt reaches the phone as the session ends, because a USSD session can’t wait for a payment.
In a workflow
Ask for a payment when a form is sent or a record changes, and wait for it to clear before the next step.
What teams build
Payments inside the services people already use.
Pay a county service fee from a USSD menu; the M-Pesa prompt arrives as the session ends.
Government
Take the registration fee by M-Pesa when the form is sent, and add each paid registration to finance’s Google Sheet.
Government
Take a clinic deposit in a WhatsApp chat, and confirm the appointment once it clears.
NGOs
Take a bill payment on a call while the line stays open.
Enterprise
Record every payment and its outcome in a data store your finance team can export.
NGOs
Once a month, send each member of a savings group an M-Pesa prompt for their contribution.
NGOs
In M-Pesa
What an M-Pesa payment step does.
One step, the same in every kind of flow.
- Currency
- Kenyan shillings (KES).
- Paid or failed
- The flow takes a paid or a failed path, so every outcome has a next step.
- Waiting
- Chats, calls and workflows wait for the payment to clear; a USSD menu sends the prompt as the session ends.
- Your money
- Payments go to your own paybill or till. Buni.ai never holds the funds.
Connecting it
Taking payments in four steps.
- STEP 01
Get your Daraja keys
Create an app on Safaricom’s Daraja portal and note its consumer key and secret, short code and passkey.
- STEP 02
Save them in Buni.ai
Add them as credentials in your workspace.
- STEP 03
Add a payment step
Choose M-Pesa and the amount, and connect the paid and failed paths.
- STEP 04
Test and publish
Try every path in the simulator, then publish.
Questions
Before you take a payment.
Which countries?
Kenya, in shillings. For Ghana, Uganda, Zambia, Cameroon and Côte d’Ivoire, use MTN MoMo.
Does a USSD menu wait for the payment?
No. A USSD session can’t stay open while someone approves a payment, so the prompt reaches the phone as the session ends.
Where does the money go?
To your own paybill or till. Buni.ai never holds the funds.
Can people pay by card instead?
Yes. Paystack, Flutterwave and Stripe send a secure checkout link, so card details never pass through a chat or a call.
Works well with
A payment prompt on the customer’s phone, from a chat, a call, a USSD menu or a workflow.
Hosted checkout links, and charges to a card the customer has saved.
Hosted checkout links, and charges to a card the customer has saved.
Checkout links, customers, payments and subscriptions — and payment events that start workflows.
Take payments where your people are.
Tell us what you need to collect, and we’ll show you the flow working with M-Pesa.