[COLOR=rgb(0, 0, 0)]Accept Visa, MasterCard, Amex, Discover, mobile wallets, and local payment methods directly in
Paymenter.
This production-ready gateway integrates
PayHere with Paymenter, letting you collect secure payments in LKR and multiple currencies with real-time status updates via IPN webhooks.
Ideal for hosting providers, SaaS, and digital merchants who want a trusted Sri Lankan payment gateway with built-in fraud protection, recurring billing, and seamless checkout without building a custom payment stack.[/COLOR]
<span style="color:rgb(0, 0, 0)"><b>What this extension does</b></span>
- <b><span style="color:rgb(0, 0, 0)">Adds &quot;PayHere&quot; gateway</span></b><span style="color:rgb(0, 0, 0)"> in Paymenter (v1.0+)</span>
- <span style="color:rgb(0, 0, 0)"><b>Creates invoices</b> with an extermal checkout (Pay Now)</span>
- <span style="color:rgb(0, 0, 0)"><b>Auto‑reconciles payments</b> via IPN (PAID)</span>
- <span style="color:rgb(0, 0, 0)"><b>Attach Transactions </b>to the Invoice</span>
- <span style="color:rgb(0, 0, 0)"><b>Supports Multiple Payment Methods </b>(Visa/Master/FriMe etc)</span>
- <span style="color:rgb(0, 0, 0)"><b>Sandbox mode</b> to test end‑to‑end without real funds</span>
- <span style="color:rgb(0, 0, 0)"><b>Clean logs</b> and minimal configuration.</span>
- <span style="color:rgb(0, 0, 0)"><b>Multiple Currencies</b> (USD/LKR)</span>
<span style="color:rgb(0, 0, 0)">Who is it for?</span>
- <span style="color:rgb(0, 0, 0)">Hosting/VPS providers and resellers using Paymenter</span>
- <span style="color:rgb(0, 0, 0)">SaaS and digital downloads needing global, borderless checkout</span>
- <span style="color:rgb(0, 0, 0)">Projects wanting to add Sri Lankan Based Gateway alongside existing gateways</span>
<span style="color:rgb(0, 0, 0)">How it works (flow)</span>
- <span style="color:rgb(0, 0, 0)">Customer selects PayHere at checkout.</span>
- <span style="color:rgb(0, 0, 0)">Extension redirects customer to the external hosted payment page</span>
- <span style="color:rgb(0, 0, 0)">Customer pays in their chosen currency</span>
- <span style="color:rgb(0, 0, 0)">Statuses are mapped in Paymenter (e.g., confirmed/finished → invoice marked paid).</span>
<span style="color:rgb(0, 0, 0)">Key Features</span>
- <b>S<span style="color:rgb(0, 0, 0)">ecure payment processing</span></b><span style="color:rgb(0, 0, 0)"> via NowPayments hosted checkout</span>
- <span style="color:rgb(0, 0, 0)"><b>Sandbox/Test mode</b> for safe end‑to‑end testing</span>
- <span style="color:rgb(0, 0, 0)"><b>Works with Paymenter v1.3+</b></span>
<span style="color:rgb(0, 0, 0)">Requirements</span>
- <span style="color:rgb(0, 0, 0)">Paymenter v1.3 or newer</span>
- <span style="color:rgb(0, 0, 0)">A PayHere merchant account (sign up at <a href="&#039;https://payhere.lk&#039;" target="_blank" class="text-[var(--vp-c-brand-1)] hover:underline">payhere.lk</a>)</span>
<span style="color:rgb(0, 0, 0)">Installation</span>
[COLOR=rgb(0, 0, 0)]
1) Install the ExtensionGo to
Admin → Browse Extensions in Paymenter and install Payhere.
2) Configure the GatewayNavigate to
Admin → Settings → Extension Settings and fill in:[/COLOR]
- <b>Merchant ID</b> (from PayHere dashboard)
- <b>Merchant Secret</b> (from PayHere dashboard)
- <b>Allow </b>non-LKR/USD invoices
- <b>Order/Invoice </b>Prefix
- <b>Sandbox Mode</b> (optional)
Edit
/var/www/paymenter/routes/web.php with your favourite text editor and place the below code at the bottom and Save .
[CODE=php]// Always load PayHere extension routes (return/cancel/ipn)
require base_path('extensions/Gateways/PayHere/routes.php');[/CODE]

<span style="color:rgb(0, 0, 0)">Testing (Sandbox)</span>
- [COLOR=rgb(0, 0, 0)]Enable <b>Sandbox Mode</b> in the gateway settings
[LIST]
- Use the PayHere sandbox portal to generate test payments
[/COLOR]
Verify that Paymenter updates the invoice automatically
[/LIST]
<span style="color:rgb(0, 0, 0)">Troubleshooting</span>
<b>Payment not marked completed?</b>
- [COLOR=rgb(0, 0, 0)]Check Paymenter logs at:
[CODE=bash]storage/logs/laravel.log[/CODE]
[/COLOR]
Minimum amount errors?
Minimum amount will be depend on your payhere package.