M-Pesa is a Mobile phone-based money transfer system. Use this tag for questions related to programmatically integrating your applications into that system. Questions related to using this system are better suited for money.stackexchange.com
Questions tagged [mpesa]
37 questions
3
votes
2 answers
How do I make an M-Pesa Callback URL using Firebase Cloud Firestore?
I'm trying to make an app that can send payments to PayBill numbers with Safaricom's "Lipa Na M-Pesa" (a Kenyan thing). The call is a POST request to URL:
https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest
with header:
{
…

Karolina Hagegård
- 1,180
- 5
- 26
3
votes
1 answer
Django MPESA integration with C2B Till Number Payment and STK Push
I would like to be able to integrate MPESA API C2B Till Number Payment capabilities with STK push into a Django Web app I am working on such that the user of the platform gets an STK Push notification to pay to the till number and the transaction is…

Pharis Mukui
- 63
- 6
3
votes
1 answer
Intergrating of AirtelMoney API to Android App
Well we can count more than three years since Safaricom released the M-Pesa APIs as RESTful APIs accessible through their developer portal. Their Github repository, has a sample android application that uses "Lipa na M-Pesa Online" API. This API…

Jack Siro
- 677
- 10
- 29
2
votes
4 answers
POST /api/mpesa/callbackurl 502 Bad Gateway in ngrok in mpesa integration
I am integrating Mpesa into my Laravel app. I have simulated a transaction where a user can make a payment successfully. After the payment I want the payment details to be stored in the database, through the callback URL. I have made an API route…

stephen Weru
- 97
- 12
2
votes
2 answers
Invalid grant type passed - STK request
I keep getting this error every time I try to make an STK push
"requestId" => "6255-20728117-1"
"errorCode" => "400.008.02"
"errorMessage" => "Invalid grant type passed"

Kihats
- 3,326
- 5
- 31
- 46
1
vote
1 answer
How do I asscociate a payment transaction with a user while consuming the MPESA Express (STKPUSH) api v1. I am not getting anything in my callback url
$curl_post_data = [
'InitiatorName' => 'testapi',
'InitiatorPassword' => 'Safaricom999!*!',
'BusinessShortCode' => '174379',
'Password' => $password,
'Timestamp' => $timestamp,
'TransactionType' => 'CustomerPayBillOnline',
'Amount' =>…

Gurpreet Singh
- 11
- 4
1
vote
1 answer
How do I asscociate a payment transaction with a user while consuming the MPESA Express (STKPUSH) api v1
I am using the MPESA-Express also called the STK push api V1 to receive payments from my clients.
To get the customer paying, I am looking for the PhoneNumber value in the results body of the response if the payment is successful. This way I can…

rufusy
- 107
- 1
- 10
1
vote
2 answers
Saving MPesa Callback data
Am trying to save MPesa Callback data, when a user has paid with Lipa Na Mpesa, ineed to save the CheckoutRequestID, with a decoded username from token, then if the payment is successful the cllback URL needs to update the associated…

marvin wekesa
- 11
- 2
1
vote
2 answers
How to solve Safaricom C2B error "Unable to identify proxy for host"
I am working with Safaricom Mpesa Daraja Api using the test credentials. Everything was working okay but suddennly I start getting the error.
{"fault":{"faultstring":"Unable to identify proxy for host: secure and url:…

Martin Mbae
- 1,108
- 1
- 16
- 27
1
vote
4 answers
Safaricom dashboard does not show all the test credentials
I am working on Safaricom Daraja API B2C but some of the required test credentials are not displayed in the Safaricom Dashboard.
As you can see above, the initiator name and security credentials are not provided yet they are needed in the B2C API…

Martin Mbae
- 1,108
- 1
- 16
- 27
1
vote
1 answer
Unable to integrate Mpesa Api into my android app
I am trying to integrate MPESA API into my android app using the procedures given by Daraja. On launching my application, the following error is displayed in my Logcat
D/OkHttp: {
"requestId": "16583-1090909-1",
…

Harrison Kuria
- 33
- 8
1
vote
1 answer
MPESA C2B Validation and Confirmation Transaction Not Responding
I am trying to record confirmed mpesa transactions. I am running them on the safaricom sandbox. My register url function and simulate_transaction both return success from my local terminal.
However, I have hosted by app on heroku and the logs on…

Pharis Mukui
- 63
- 6
1
vote
1 answer
Load another Sweet Alert Window after elapse of Timer
I am doing a payment module on opencart. The problem is that the payment gateway requires a callback url that can only update the order history but difficult to refresh the browser. What I have done is that, after submitting the payment data via a…

japheth
- 373
- 1
- 10
- 34
1
vote
3 answers
Integrate Mpesa API with google forms
I want to integrate Mpesa API to a google form.
Users using the form to pay, let us say for registration Fee

Ruth
- 69
- 1
- 9
0
votes
0 answers
How to request a mobile number to make payment with MPESA API with PHP
I visited the Safaricom Daraja portal and learnt that a developer needs to have the consumer key and consumer secret in order to make a request to the MPESA API to request a certain mobile number to make payment to a specific paybill. I have the…

Son of Man
- 1,213
- 2
- 7
- 27