MonCash never redirects back to my site after payment
poze 3 months ago523 gadeen
0
The customer pays successfully (they even get the SMS), but they stay on the MonCash page or land on a MonCash success screen. My return URL is never hit. Where do I set the return URL in the request?
Dyagnostik IA
Se IA ki fè l. Se pa yon repons — kominote a anba a konfime oswa korije l. Toujou verifye anvan ou fye l.
poze 3 months ago
David Charles 2.9k
1 Repons
7
✓✓ Repons yo aksepte
You don't set it in the request. The return URL (and the alert/notification URL) are configured in the MonCash merchant portal, per business account and per environment. If they're empty or wrong, MonCash has nowhere to send the customer.
Checklist:
- Portal settings: open the business dashboard for the same environment (sandbox or live) you're testing and set the return URL, e.g.
https://shop.example.ht/moncash/return. - It must be reachable from the internet.
http://localhost:3000works only if the redirect happens in your browser. For the alert URL, which MonCash calls server to server, localhost never works. While developing, expose your machine with a tunnel (Cloudflare Tunnel or ngrok) and put the tunnel URL in the sandbox settings. - Use HTTPS in production, with a valid certificate.
- Don't depend on the redirect alone. Customers close tabs and phones lose connection mid-payment. Also run a background check that looks up orders still "pending" after a few minutes with
RetrieveOrderPayment, so a paid order never stays unpaid in your system.
Konekte pou di lòt moun si li te mache.
answered 3 months ago
Nadège Paul 1.5k
Sign in and verify your email to post an answer.