safaricom / mpesa-php-sdk

A PHP sdk for the new Mpesa RESTful APIs
188 stars 219 forks source link

StkPushQuerry- Bad Request - Invalid Timestamp #43

Open bettkipronoh opened 4 years ago

bettkipronoh commented 4 years ago

When checking the status of a Lipa Na M-Pesa Online Payment, I get Bad Request - Invalid timestap.

ghost commented 2 years ago

I have the same issue with STK Push.

Kalela commented 1 year ago

Any luck with this? @JuniaKE @bettkipronoh

Kalela commented 1 year ago

Found the issue. Leaving this for the Future Daraja crossers. The Daraja API uses its own format for the timestamp. It is more like a concatenation of the date and time. Say 20230411000 being 2023 April first at 10am. A sample timestamp is 20230718171607 . Best option is to copy it from the API simulator for testing. See image

Screenshot 2023-07-18 at 17 16 48