mpesa does not allow the use of tunnelling tools such as ngrok for security reasons... try deploying your functions on cloud platforms such as netlify or vercel and get your callback url from there.