Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox not getting callback #53

Open
perfait opened this issue Dec 1, 2021 · 15 comments
Open

Sandbox not getting callback #53

perfait opened this issue Dec 1, 2021 · 15 comments

Comments

@perfait
Copy link

perfait commented Dec 1, 2021

Hello. I'd really use your assistance. I'm on sandbox and everything is working fine until after the user pays. The buyer pays using STK push but no callback is made back to the website so as to complete the order.

@maukoese
Copy link
Contributor

maukoese commented Dec 2, 2021 via email

@perfait
Copy link
Author

perfait commented Dec 2, 2021

Thank you for your response. I love your response time. When was the last time you tried the sandbox?

@maukoese
Copy link
Contributor

maukoese commented Dec 2, 2021 via email

@perfait
Copy link
Author

perfait commented Dec 2, 2021 via email

@Michez86
Copy link

Hi my site is live and am using live credentials but am not receiving any call back on my website after payment and download the product
Anyone Kindly assist?

@maukoese
Copy link
Contributor

maukoese commented Jan 12, 2022 via email

@tjpin
Copy link

tjpin commented May 26, 2022

Anyone who was able to solve this issue? Am experiencing the same problem. I cant receive callback response.
Everything else is ok.
Am on sandbox not production.

@FaddyDev
Copy link

FaddyDev commented Feb 3, 2023

Hey,

I encountered the same error, wondering why my callback was not being hit by safaricom because I had written code there to save the results in the database. Then I thought of testing my callback to ensure it was working well. That's when I code an error with my callback code. I fixed it and everything started working fine.

Therefore, I suggest you call your callback URL from Postman. In the body, pass parameters in the exact format as safaricom. You can use the below one. Then fix any errors encountered.

{
"Body": {
"stkCallback": {
"MerchantRequestID": "51165-189061416-3",
"CheckoutRequestID": "ws_CO_01022023215432073700123123",
"ResultCode": 0,
"ResultDesc": "The service request is processed successfully.",
"CallbackMetadata": {
"Item": [
{
"Name": "Amount",
"Value": 1
},
{
"Name": "MpesaReceiptNumber",
"Value": "RB12P0ICD8"
},
{
"Name": "Balance"
},
{
"Name": "TransactionDate",
"Value": 20230204215444
},
{
"Name": "PhoneNumber",
"Value": 254700123123
}
]
}
}
}
}

@kamnjoro
Copy link

Hey,

I encountered the same error, wondering why my callback was not being hit by safaricom because I had written code there to save the results in the database. Then I thought of testing my callback to ensure it was working well. That's when I code an error with my callback code. I fixed it and everything started working fine.

Therefore, I suggest you call your callback URL from Postman. In the body, pass parameters in the exact format as safaricom. You can use the below one. Then fix any errors encountered.

{ "Body": { "stkCallback": { "MerchantRequestID": "51165-189061416-3", "CheckoutRequestID": "ws_CO_01022023215432073700123123", "ResultCode": 0, "ResultDesc": "The service request is processed successfully.", "CallbackMetadata": { "Item": [ { "Name": "Amount", "Value": 1 }, { "Name": "MpesaReceiptNumber", "Value": "RB12P0ICD8" }, { "Name": "Balance" }, { "Name": "TransactionDate", "Value": 20230204215444 }, { "Name": "PhoneNumber", "Value": 254700123123 } ] } } } }

How were you able to resolve the issue. Any assistance will be highly appreciated.

@kamnjoro
Copy link

A Postman call to the endpoint created for reconciliation returns
"{"resultCode":1,"resultDesc":"Reconciliation failed"}"

@harsh-biz
Copy link

harsh-biz commented Sep 8, 2023

@FaddyDev @maukoese @perfait What data does mpesa send in your callback url because i am getting an empty dictionary in my callbackurl controller.

@mikemills254
Copy link

I have a similar problem however when I test the callback by maybe canceling the transaction it works well but when I complete the transaction there is no callback and I am on sandbox, not production

@mutisyajonathan
Copy link

As at today Feb 18,2024 safaricom daraja stkpush not calling my callback url after user responds to the prompt... anyone with solution?

@harsh-biz
Copy link

harsh-biz commented Feb 19, 2024

@mutisyajonathan Make sure your return url is live and is "https".

@Faustine254
Copy link

image
I'm stuck there after making payment, i think it's a callback issue. I'm using sandbox and https.
Does anyone have a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants