Odoo 19 app

Nepal Payment Gateway

Take eSewa and Khalti payments in Odoo 19, verified with each wallet before an order is confirmed

eSewaKhaltiePay v2KPG-2NepalNPR

What it does

Adds eSewa and Khalti as two payment providers in Odoo, in one module. The customer pays in the wallet and comes back; Odoo checks the result with the wallet server before it confirms the order. Khalti refunds are made from Odoo.

Who it is for

  • Nepali online shops on Odoo eCommerce. Most local buyers pay with a wallet rather than a card. This adds eSewa and Khalti as payment providers at checkout, and Odoo checks the result with the wallet before the order is confirmed.
  • Service businesses billing in NPR. Customers can pay invoices from the portal or through an Odoo payment link with eSewa or Khalti, and the payment is reconciled against the invoice like any other provider.
  • Shops that lose payments when customers close the tab. If a customer pays but never returns to the site, a scheduled action re-checks pending payments every 15 minutes with the eSewa status API or the Khalti lookup API.
  • Merchants who issue Khalti refunds. Khalti payments can be refunded in full or in part from Odoo with the Refund button. eSewa doesn't publish a refund API, so eSewa refunds still have to be handled with eSewa directly.

Features

eSewa ePay v2signed form with HMAC-SHA256, signature check on the answer, then the status check API decides
Khalti web checkout (KPG-2)initiate and lookup APIs with amounts in paisa; the lookup API decides, not the callback
Khalti refundsfull or partial from Odoo, including the mobile number that bank payments require
Pending payments re-checkedneither wallet publishes a webhook, so a scheduled action checks open payments every 15 minutes
Amount checka wrong amount puts the payment in error
Point of Saleonly through Odoo's own POS online payment module (pos_online_payment), which you install separately; this module adds no POS screen. Neither wallet requires customer details, so an order with no customer can pay and nothing is invented
Test and productioneach provider has its own keys and uses the wallet test servers in Test mode
API logeach call and return, with signatures and customer details masked
Nepalitranslation included; Odoo 19 ships no Nepali language, so the module adds one that you switch on in Settings > Languages

Setting it up

  1. Go to Invoicing > Configuration > Payment Providers and open eSewa or Khalti.
  2. Leave the state on Test Mode to use the eSewa and Khalti sandbox addresses first.
  3. For eSewa, enter the Product Code and eSewa Secret Key you received from eSewa. For Khalti, paste the Khalti Secret Key from your merchant dashboard.
  4. Press Test Connection and check the API Log if anything fails.
  5. Make sure the provider's currency is NPR, set Keep API Log (days) if you want something other than 90, and publish the provider.
  6. Place a test order on your shop, pay in the wallet sandbox and confirm the transaction turns to done. Then switch the provider to Enabled with your live keys.

Nepal Payment Gateway: questions

Which currency is supported?

Only Nepalese rupees (NPR). The providers aren't offered for orders in another currency.

Do I need Enterprise?

No. It depends on the standard payment and account_payment modules, which are part of Community.

How does Odoo know a payment is genuine?

For eSewa, the answer on the return URL is checked with the HMAC-SHA256 signature from your secret key, then confirmed with the status check API. For Khalti, Odoo calls the lookup API and only treats the status Completed as paid.

Is there a minimum amount?

Khalti refuses amounts under Rs 10 (1,000 paisa), so Odoo blocks a Khalti payment below that. eSewa has no such check in the module.

Can I use it at the Point of Sale?

If Odoo's POS online payment module is installed, the providers can be used for POS orders like any other online provider. Walk-in POS customers without contact details are handled, but this module doesn't add a separate POS screen of its own.

Are customer details kept in the logs?

The API Log stores calls and answers for troubleshooting, with signatures, authorization headers, phone numbers, e-mails and names masked. Old entries are removed daily after the retention period.