4

M-Pesa STK push: the callback URL is never called after the customer confirms

TA Tunde Adeyemi 131 il y a 1 mois Nigeria

I trigger an STK push from a Node.js backend. The customer receives the prompt and confirms with their PIN, the money leaves their account, but my callback endpoint never receives anything.

Modifiée il y a 16 minutes
2
AO Abena Owusu 76 · il y a 1 mois Réponse acceptée

The callback must be publicly reachable over HTTPS with a valid certificate, and it cannot point to localhost. For local development use a tunnel such as ngrok and register that URL. Also check that your route accepts POST with a JSON body: app.use(express.json()) must run before the route.

4
CO Chinedu Okafor 91 · il y a 1 mois

Log every incoming request at the very top of the handler, before any validation. If nothing shows up, the problem is network or URL; if requests show up with 4xx errors, it is your middleware. Always reply 200 quickly and process the payload asynchronously.

Vous connaissez la réponse ? Rejoignez Griot pour aider.

Publier

Poser une question Obtenir de l'aide de la communauté Publier un composant Partager un SDK, un wrapper ou un package Proposer un troc Échanger une heure d'aide contre une autre Créer une prime Récompenser une solution en Mobile Money Organiser un hackathon Lancer un défi pour la communauté
Troc de compétences Primes Hackathons Observatoire