Questions tagged [mpesa]

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

37 questions
0
votes
0 answers

how do you associate a user with a payment when using mpesa express on python django

the response body on the call back is usually: { "Body": { "stkCallback": { "MerchantRequestID": "21605-295434-4", "CheckoutRequestID": "ws_CO_04112017184930742", "ResultCode": 0, …
0
votes
1 answer

Integration of M-Pesa Daraja API: Bad Request - Invalid PhoneNumber

I'm integrating M-Pesa into my application using the Daraja portal, but I'm encountering an issue with the "Bad Request - Invalid PhoneNumber" error. Despite using a valid Kenyan phone number, I'm unable to proceed successfully. code and…
rriol
  • 1
0
votes
0 answers

Firebase cloud function onRequest() not being triggering

My firebase cloud function is not working as expected and this is causing a headache, for me and my freelance client(my first freelance job). The following is my cloud function. It is supposed to receive payload payment data in json format. This…
0
votes
0 answers

Generate Outh tokens on Dafaricom. Api M-Pesa Java/kotlin

I've been trying to integrate the M-Pesa API into my app in Android Studio for days now and I'm trying to do this with Daraja/safaricom.co.ke portal!! Well I'm stuck for a long time when to do authorization and generate Outh tokens to get access to…
0
votes
1 answer

How can I utilize firebase cloud functions as a callbackurl to receive Mpesa payment responses?

I'm trying to utilize firebase cloud functions as a callbackurl to receive Mpesa payment responses from Safaricom. So far consuming the mpesa api and prompting the user to input their pin works. I have tried to go further and write some cloud…
0
votes
1 answer

Mpesa Mini Program Pdf choose from gallery issue

i am trying to upload a pdf in mini program studio i am able to choose image using from gallery my.chooseImage({ count: 1, success: (res) => { console.log(res); }, }); console of above code is apFilePaths:…
0
votes
0 answers

Mpesa STK push API update for Android Studio

There has been an update to the STK push library for Mpesa service integration onto Android Studio applications. The old version went something like implementation 'com.androidstudy:daraja:1.0.2' The news version is implementation…
0
votes
0 answers

Firebase function not returning a response in Android

I am trying to add M-PESA checkout option in my app and I need to confirm that the payment made by the user went through before confirming the order. My callback URL is a Firebase Function. While I am able to show the STK-PUSH, the callback URL…
0
votes
0 answers

I keep running into this error when trying to call a register_url using daraja, a safaricom api for a c2b request. I am building the app with node js

**I am met with this error when calling a register_url, ** {"Envelope":{"encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","Body":{"Fault":{"faultcode":"soap:Server","faultstring":"Execution of ServiceCallout SC-SearchURL failed. Reason:…
0
votes
1 answer

How to save mpesa transaction in my django app

I am currently working on a django app where I can be able to see and save all transaction made via my till number... No stk push just to be able to see and save all transaction done to that till number... Is there a way I can achieve that
0
votes
1 answer

Sasapay register URL returns error 404. What could be the problem?

Not FoundThe requested resource was not found on this server.
0
votes
1 answer

How to encrypt using a RSA certificate in nodejs?

I am going through some docs where I am required to encrypt some data using a certificate. The docs say Encrypt the array with the M-Pesa public key certificate. Use the RSA algorithm, and use PKCS #1.5 padding (not OAEP), and add the result to the…
YulePale
  • 6,688
  • 16
  • 46
  • 95
0
votes
1 answer

Callback URL not receiving JSON data

I have a PHP page that receives JSON responses located at https://example.ac.ke/op/api/mypesa/index.php I have success posting responses using Postman when I post to…
0
votes
1 answer

I am trying to intergrate mpesa payment api to dynamically pass the store price and the correct response

I have been trying to intergrate mpesa API and make my payment dynamically I manage to see the correct value in my cart on my phone stk push but on the web browser I get an error local variable 'order' referenced before assignment and the console…
d3vkidhash
  • 301
  • 1
  • 10
0
votes
1 answer

How can you reference the checkoutRequestId from daraja API's mpesa express request dynamically

I am working on an android app with an Mpesa payment module. I have already been able to generate the STKPush giuded by this tutorial on medium: https://medium.com/@lentimo/m-pesa-integration-on-android-part-2-75430ccda2fe . My goal is to be able to…