safaricom/LNMOnlineAndroidSample

Callback URL Error

Closed this issue · 1 comments

ochom commented

Hi everyone, So am trying to make an STK push in adnroid app using java and I get the following error:

{
"requestId":"19072-295731-1",
 "errorCode": "400.002.02",
 "errorMessage": "Bad Request - Invalid CallBackURL"
}

when I call

LNMExpress lnmExpress = new LNMExpress(...credentials including callbackurl)

my callback url looks like: https:my_app.herokuapp.com/api/mpesa_response/

this url works fine and I've tested it with Postman. It accepts both POST and GET

I'll appreciate If anyone can help me.

ochom commented

I figured out that there were some funny spaces in my callback url and everything works perfect now