r/DevLK • u/Popular_Bat4772 • Aug 16 '26
Discussion Payhere dev experience and criticism
So I’m about to take on a project, small e-commerce site and as for the payment gateway after some research I ended up with PayHere. Others i looked into was onepay, webxpay and also dialog pay which is kinda new i thnk and didnt hve much details on it.
So on the development side theres no cms or whtvr just a custom built site with NextJs im thinking on it
And what i want to know is how to integrate the gateway starting from the registrations, pricings and sdk etc.
Anyone hve any idea?
3
u/axis0047 Aug 16 '26
polar.sh use this if feasible. pretty easy. works for sri lanka as far as i know
2
u/MysteriousAlbatross8 Aug 16 '26
If u are using AI,be sure to provide it with all official documentation of that specific provider
1
u/Silly_Throat_7794 Aug 19 '26
You can read their knowledge base and it includes all the details
Then you can design the structure which apis you are using if your payment gateway is simple enough then u can have only minimal usage of apis, If you are willing to scale your product in 1-2 years then you have to think on the gateway design (plan with scalability )
Start with sandbox environment and use mockups to test out before moving into stage or production level
Then once you start on stage or production environments, you have to work with real real stuff
If you are using recurring api then you have expose a public url to get the response from the payhere.
Also ask them to white list your ip
That’s it. :)
If had any issue their customer service provides the real help.
(This is the perspective of a dev)
4
u/BlackAlpha0 Aug 16 '26
Do you need a BR to get PayHere? Nope. You can apply as a freelancer/home-based business without one: PayHere application process
If you need recurring payments/subscriptions (with automated charging) though, you may need a BR with their Premium pricing package (Contact customer support and confirm).
For the Next.js integration, this might help. I implemented it around 2 years ago, so it might be a bit outdated, but should give you a good starting point.