We recommend checking out the introductory
section to understand the basics of direct
charge first. This guide assumes you’ve read that.
KES, your customers can pay with M-PESA.
The Process
This involves the following steps:- You call our API to create a charge and pass in the customer’s mobile number.
- Your customer completes the payment by authorizing it from their M-PESA app.

Initiating the Payment
First, you’ll need aphone_number, the customer’s M-PESA mobile number.
Combine that with the rest of the payment details to create the payload and send it to our charge M-PESA endpoint. You’ll need to specify amount, currency, email and a unique tx_ref.
You can also specify more details, such as the customer’s fullname, phone_number, and custom meta information. See the endpoint documentation for details.
Handling the Response
You’ll get a response that looks like this:Success
data.status is "pending", meaning the transaction is yet to be completed. The data.auth_model is "LIPA_MPESA", which means the customer will authorize this via their M-PESA app. Typically, they will get a push notification from the app and complete the payment by entering their PIN.
Completing the Payment
To complete the payment, the customer will authorize it via their M-PESA app.Testing TipIn Test Mode, M-PESA payments will automatically be authorized after a few seconds.