-
Notifications
You must be signed in to change notification settings - Fork 128
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
Lipa na mpesa using STK Error #8
Comments
You need to provide more details ,like what you have tried first |
Hi @weddingjuma basically the shortcode you are using in your request body is not allowed to perform STK push request, there is a test shortcode on the dev portal, however for production you will have to apply for an LNMOnline shortcode |
Thanks @kisese for your reply, for the test credentials are you referring to Shortcode 1, shortcode 2 or the Lipa Na Mpesa Online Shortcode am reffering to test credentilas on the developers portal |
@weddingjuma use the Lipa Na Mpesa Online Shortcode and the Lipa Na MPESA Online passkey |
Thanks @kisese, i will try it out |
In step 2 using the screen shot (https://github.com/safaricom/LNMOnlineAndroidSample) ie (Add a customers phone number:) is it the Marchant or the Customer who gets this on their phone |
@weddingjuma Its the merchant who gets this i.e the merchant enters the customers phone number on the app so that the customer gets the STKPush and proceeds to pay. |
@dennisoft Which marchant validation issue? Are you referring to the issue of invalid token? if so I realized some times the safaricom test Short code does not work, so me i normally test in in the night, and most of the time it work |
@weddingjuma how did you get yours sorted? I still can't get past that error. |
@weddingjuma how did you manage to go about solving this |
Hello guys. Am using test details. My project does not show on successful payment dialog. What could be the problem. |
I want my customer to be awarded points on every success payment but don't know how to trigger this action. Where exactly should I put this code. |
Not yet
…On Sun, Aug 5, 2018, 23:30 Madona Syombua ***@***.***> wrote:
Were this issues resolved? would love to help out :) 👍
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AlHMLN9AimINziY9s3IP7nk5ngCIJH1hks5uN1XQgaJpZM4QBnmf>
.
|
Okay waiting
…On Mon, Aug 6, 2018, 02:38 Madona Syombua ***@***.***> wrote:
@philodoer <https://github.com/philodoer> I see, would love to see what
the team says. 😊 and also if they accept contributions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AlHMLNAlveVUV6f-1zgmJdy3-tNWkn1hks5uN4HkgaJpZM4QBnmf>
.
|
make sure you are using ssl, the url has to be on ssl otherwise you will always get errors |
@weddingjuma Did you manage to sort your error? Also getting the same on Daraja 👍 { { "requestId":"18519-4869397-1", "errorCode": "400.002.02", "errorMessage": "Bad Request - Invalid Amount" } { "requestId":"18519-4869397-1", "errorCode": "400.002.02", "errorMessage": "Bad Request - Invalid Amount" } |
I used to get te same Errors, replace your whole code with what safaricom has given on the developers portal, then use the test credentials |
Hi @Nellyazx I took the curl they have provided and passed the test credentials they have, also encodedbase64.encode(Shortcode+Passkey+Timestamp) but getting the same issue. Also Daraja is geving a different error from web though I pass the test credentials with the same token |
@Nellyazx Kindly share(if ur willing) a sample of your working stk_push_request |
'174379', 'Password' => 'MTc0Mzc5YmZiMjc5ZjlhYTliZGJjZjE1OGU5N2RkNzFhNDY3Y2QyZTBjODkzMDU5YjEwZjc4ZTZiNzJhZGExZWQyYzkxOTIwMTgwODE0MDg1NjIw', 'Timestamp' => '20180814085620', 'TransactionType' => 'CustomerPayBillOnline', 'Amount' => '10', 'PartyA' => '254701121217', 'PartyB' => '174379', 'PhoneNumber' => '254701121217', 'CallBackURL' => 'https://agizapap.com/rideNeibaResponse', 'AccountReference' => 'Debt', 'TransactionDesc' => 'Pay Now' ); $data_string = json_encode($curl_post_data); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string); $curl_response = curl_exec($curl); //print_r($curl_response); echo $curl_response; ?> |
Remember to change your Bearer Access Token |
Thanks @Nellyazx it worked,really appreciate.....b blessed |
Welcome...I had the same problem too...Took me two weeks.. |
Shared Knowledge is better than Hoarded information |
HI, am planning to do a proper video of this https://www.youtube.com/watch?v=_04nuPavXUU&list=UUV4FsD2gBl4m9D0l-lF9o6Q&index=4 |
I think giving discounts is better to points. |
@philodoer the reason I am suggesting this. is from the bitcoin story. On 22 May 2010, Laszlo Hanyecz made the first real-world transaction by buying two pizzas in Jacksonville, Florida for 10,000Bit Coins approx $30. Today that is worth 100million USD. Let us pull guys to online transactions because hakuna kanjo hapa. |
Im trying a B2B online transaction with this body segment: |
Yes i solved it thanks
On Sep 8, 2023 12:46 PM, "jdtheefirst" ***@***.***> wrote:
hello am getting these error { "requestId": "23185-10349146-1",
"errorCode": "500.001.1001", "errorMessage": "Merchant does not exist" }
kindly help
Did you get help?
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARS2622UVZSYCU3NFTUG2STXZLSPTANCNFSM4EAGPGPQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
How did you about it, I am still getting the same error here; |
Are you working on production?
On Sep 8, 2023 2:20 PM, "jdtheefirst" ***@***.***> wrote:
How did you about it, I am still getting the same error here;{
"BusinessShortCode": "8799520", "Password":
"ODc5OTUyMGJmYjI3OWY5YWE5YmRiY2YxNThlOTdkZDcxYTQ2N2NkMmUwYzg5MzA1OWIxMGY3OGU2YjcyYWRhMWVkMmM5MTkyMDIzMDkwODEyMTM0NQ",
"Timestamp": "20230908130630", "TransactionType": "CustomerBuyGoodsOnline",
"Amount": "1", "PartyA": "254113062599", "PartyB": "8799520",
"PhoneNumber": "254113062599", "CallBackURL": "
https://f912-154-78-131-69.ngrok-free.app/Gold/callback",
"AccountReference": "Admin", "TransactionDesc": "Test" } to this; {
"requestId": "92639-49298957-1", "errorCode": "500.001.1001",
"errorMessage": "Merchant does not exist" }
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARS2624JO3XZXNNTBC7W2FTXZL5ONANCNFSM4EAGPGPQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
No localhost apparently, but first I was cheking this withh POSTMAN |
Ooh actually the sandbox was down at the time and I waited for 12 hours
after which the issue was fixed
On Sep 8, 2023 2:56 PM, "jdtheefirst" ***@***.***> wrote:
No localhost apparently, but first I was cheking this withh POSTMAN
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARS2627WWSE6XEY5GSGICIDXZMBV3ANCNFSM4EAGPGPQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I encountered that error when trying to access Sandbox while it was down,
but it's a good idea to reach out to a friend or the Safaricom API team if
the problem persists. You can contact them via WhatsApp at 0715133221.
…On Fri, Sep 8, 2023 at 3:05 PM Toxic King ***@***.***> wrote:
Ooh actually the sandbox was down at the time and I waited for 12 hours
after which the issue was fixed
On Sep 8, 2023 2:56 PM, "jdtheefirst" ***@***.***> wrote:
No localhost apparently, but first I was cheking this withh POSTMAN
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARS2627WWSE6XEY5GSGICIDXZMBV3ANCNFSM4EAGPGPQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
In the code you provided, you are setting ReceiverIdentifierType to "11". However, the ReceiverIdentifierType should be set based on the type of identifier you are using for the receiver. The value "11" corresponds to a Till Number, and this may not be appropriate for your specific use case, i see re on production take note of store number and the till number . |
I am getting the following error in production |
Probably you are using the wrong BusinessShortCode or Party B. For Till Numbers, the BusinessShortCode is the H.O Number. and PartyB is the actual Till Number. |
hey guys is anyone facing an error message when simulating a transaction in the daraja portal simulator? |
Daraja portal simulator is not reliable |
def generate_access_token_request
|
Am getting this |
Am getting this any help here |
Hello, I'm getting the same error How do I get the H.O Number?, I only have the Store Number and Till Number. |
You can use Store number as the H.O number |
This is the payment data that is supposed to be sent, according to the docs.
|
@C-o-m-o-n use TransactionType: |
Look at the request I,m sending: |
Is 4336458 the till number or store number? |
That's the till number. But I get the same error when I use the store number |
@C-o-m-o-n you should use the store number not till number |
Okay I'll try and let you know if it works |
Not working |
did you manage to make it work? |
You need to go live on daraja API website first, "Merchant does no exit" response comes up if your till is not upgraded to handle live payments. You need to talk to [email protected] for that. At the end you'll be sent an organization passkey with a live app on daraja API under Apps |
It worked with the test data . I still haven't been able to make it work with my till |
Thanks a lot let me try that |
Thanks a lot @MyronSCave . I talked to the Safaricom tean through the email you provided and got helped. |
Anybody who still encouter this error when on sandbox, i.e using dev test credential should note that; on sandbox, your {
"phoneNumber": "+25470****8", //masked for demo. You should have a real phone number
"TransactionType":"CustomerPayBillOnline",
"TransactionDesc": "Test fish payment",
"amount": 500,
"checkoutId": "CART3GVMZ",
...
} You can also note that when using the daraja portal similator, you're not able to switch Transaction Type from Mpesa team should confirm if this is the case. |
why do I get this error, Am testing because I want to move into production
{
"requestId": "1494-250373-3",
"errorCode": "500.001.1001",
"errorMessage": "[MerchantValidate] - Wrong credentials"
}
same a s this https://developer.safaricom.co.ke/content/merchantvalidate-wrong-credentials-stkpush-simulation
The text was updated successfully, but these errors were encountered: