WebApp Nepal Logo

eSewa Payment Gateway Integration in Nepal – WebApp Nepal

Quick answer

WebApp Nepal integrates the eSewa merchant gateway into WooCommerce or custom sites, with server-side verification of every payment, so you can accept Nepal's most widely used wallet.

A Kathmandu clothing retailer running a WooCommerce store had built a functional website with a reasonable product catalogue and genuine customer interest. The problem was payment. The store's only checkout option was bank transfer - customers had to copy the owner's bank account number, go to their own internet banking, transfer the amount, and then send a screenshot on Viber before the order was processed. A third of the orders that reached that step never converted. Customers who were ready to buy abandoned the process because it was slower and more uncertain than buying in person. The owner had heard eSewa was possible to integrate but assumed it required a technical team or an enterprise-level account with eSewa. After switching to eSewa merchant gateway integration - a process that required opening an eSewa merchant account and integrating the API into the existing WooCommerce store - the payment drop-off rate fell immediately. Customers paid in two taps from a wallet they already had loaded with money. The orders that had been falling away at the payment step started completing.

eSewa is Nepal's most widely used digital payment platform, with over eight million registered users across the country. It is the payment method that most Nepali online buyers already have installed, already have funded, and already trust. A Nepal business website that offers eSewa checkout is meeting its domestic customers at the payment method they use every day - for electricity bills, mobile top-ups, school fees, and grocery purchases. The friction of payment is already gone before the customer reaches the checkout. eSewa's merchant gateway extends this to e-commerce and service payment contexts: an eSewa merchant account allows any Nepal-registered business or individual to accept eSewa payments on their website or application, with settlement directly to their eSewa merchant wallet and transfer to their linked Nepal bank account. WebApp Nepal integrates eSewa payment gateway for Nepal businesses across WooCommerce, custom PHP, Node.js, Next.js, and React Native applications - building checkout flows that convert because they remove the last barrier between a customer who wants to pay and a payment being completed.

WebApp Nepal integrates the eSewa merchant payment gateway for Nepal businesses running WordPress and WooCommerce stores, custom-built booking systems, event registration portals, subscription platforms, school and college fee collection systems, and mobile applications targeting Nepali users. Integration covers eSewa's current API standard (eSewa Payment Gateway v2 with HMAC-SHA256 signature verification), webhook configuration for asynchronous payment event notification, server-side payment verification before order status updates, and the merchant account setup process at eSewa's merchant portal. Every integration WebApp Nepal delivers is built on server-verified payment confirmation - not on the redirect URL parameter that can be manipulated by a technically-informed user.

eSewa Merchant Account Setup

Who Can Open an eSewa Merchant Account

Any Nepal-registered business entity - private limited company, public limited company, partnership firm, sole proprietorship, NGO, INGO, cooperative, educational institution, or hospital - can apply for an eSewa merchant account. Individual professionals and freelancers operating as sole proprietors with a valid PAN registration can also open eSewa merchant accounts. The account is registered in the business or individual's name, linked to the business's registered eSewa mobile number, and issued a merchant code (product code) that identifies the merchant in all eSewa API transactions. WebApp Nepal advises clients on the merchant account registration process before integration work begins, because the merchant code issued at registration is a required parameter in every eSewa API call and the integration cannot be tested end-to-end without it.

eSewa Merchant Account Registration Process

Registering an eSewa merchant account involves submitting the application through eSewa's merchant registration portal or through a formal request to eSewa's merchant services team at esewa.com.np. The documentation required for business entities includes: company registration certificate, PAN certificate, memorandum of association or partnership deed, board resolution or authorisation letter naming the account signatory, citizenship document of the authorised signatory, and the business's primary contact details including the mobile number to be linked to the merchant account. Sole proprietors submit PAN registration, citizenship document, and business registration if the business is formally registered. eSewa reviews the application and issues the merchant account, test credentials for sandbox integration, and production credentials after the account is active. The turnaround from complete application to active merchant account typically ranges from three to seven business days. WebApp Nepal guides clients through the documentation preparation and application submission and begins technical integration work in parallel using eSewa's UAT (User Acceptance Testing) sandbox environment before production credentials are available.

eSewa Merchant Wallet and Bank Settlement

Payments received by an eSewa merchant account accumulate in the merchant's eSewa wallet balance. Settlement from the eSewa merchant wallet to the merchant's linked Nepal bank account is initiated by the merchant through the eSewa merchant portal or through an automated settlement schedule configured with eSewa. eSewa supports settlement to accounts at the major Nepal commercial banks. There is no automatic daily settlement by default - the merchant initiates the transfer from their eSewa balance to their bank account when required. WebApp Nepal advises clients on settlement management practices so that eSewa balances are reconciled with the merchant's accounting records and bank transfers are initiated on a schedule that matches the business's cash management requirements.

eSewa Payment Gateway API – Technical Overview

eSewa Payment Gateway v2 and HMAC-SHA256 Signature

eSewa's current payment gateway standard uses HMAC-SHA256 cryptographic signature verification to authenticate payment initiation requests and validate payment verification responses. The merchant's secret key - issued at merchant account registration - is used to generate an HMAC-SHA256 signature of a defined set of transaction parameters (total amount, transaction UUID, and product code). This signature is sent with every payment initiation request and verified by eSewa's servers before the payment is processed. On the payment result side, eSewa returns a signed response that the merchant's server must verify using the same HMAC-SHA256 mechanism before accepting the payment as confirmed. This bidirectional signature verification is the security architecture that prevents two classes of payment fraud that affect simpler gateway implementations: tampered payment initiation requests (where a customer modifies the payment amount before submission) and result parameter manipulation (where a customer modifies the redirect URL parameters after the eSewa payment page to falsely indicate payment success). WebApp Nepal implements both signature generation on payment initiation and signature verification on payment result as non-negotiable components of every eSewa integration.

Transaction UUID – Unique Transaction Identification

Every eSewa payment transaction requires a unique transaction_uuid - a universally unique identifier that distinguishes this specific transaction from all others in the merchant's payment history. The transaction_uuid is generated by the merchant's server (not the browser) before initiating the eSewa payment request, stored against the pending order record in the merchant's database, and included in both the payment initiation request and the post-payment verification call. The uniqueness of the transaction_uuid prevents duplicate payment submissions - if eSewa receives two payment requests with the same transaction_uuid, the second is rejected. WebApp Nepal generates transaction_uuids server-side for every eSewa integration - never in the browser, where the generation can be observed and replayed by a malicious user attempting a duplicate submission attack.

Payment Initiation Flow

The eSewa payment flow that WebApp Nepal implements works as follows: the customer selects their product or service and reaches the checkout page on the Nepal merchant's website; the merchant's server creates a pending order record in the database, generates a transaction_uuid, calculates the payment amounts (base amount, service charge, delivery charge, tax amount, total amount), generates the HMAC-SHA256 signature, and renders the checkout page with a form containing the signed payment parameters; the customer clicks the eSewa payment button, which submits the form to eSewa's payment endpoint; eSewa presents its own hosted payment page where the customer authenticates with their eSewa account and confirms the payment; on payment completion, eSewa redirects the customer to the merchant's success URL with an encoded response payload; the merchant's server decodes the response, verifies the HMAC-SHA256 signature, and calls eSewa's payment verification API to confirm the transaction status server-to-server before marking the order as paid. The payment verification API call - the server-to-server confirmation step - is the definitive payment confirmation. The redirect to the success URL is not payment confirmation by itself.

Server-Side Payment Verification

After eSewa redirects the customer to the merchant's success URL, the merchant's server receives an encoded response payload. This payload must be decoded and its signature verified before the transaction is trusted. The server then calls eSewa's transaction status lookup API with the transaction_uuid and total_amount to receive eSewa's authoritative confirmation of the payment status. Only after this server-to-server verification returns a confirmed status does WebApp Nepal's integration mark the order as paid, trigger the confirmation email, and update the inventory or booking record. An integration that updates order status based solely on the redirect URL parameters - without the server-to-server verification step - is vulnerable to a customer who manipulates the return URL parameters to simulate a successful payment without actually paying. WebApp Nepal does not build eSewa integrations of this type. Every integration includes the full server-side verification flow.

eSewa Payment Gateway Endpoints – UAT and Production

eSewa operates two separate API environments: the UAT (User Acceptance Testing) sandbox at rc-epay.esewa.com.np, used for development and testing with eSewa's provided test credentials and test eSewa accounts, and the production environment at epay.esewa.com.np, used for live transactions with real merchant credentials and real customer eSewa accounts. WebApp Nepal builds all eSewa integrations in the UAT environment first, completing the full test scenario set before switching to production credentials. The UAT environment uses known test secret keys and test merchant codes that allow integration testing without a production merchant account. When the merchant's production credentials are issued after merchant account approval, the integration is switched to the production endpoint with a final live-environment validation using a real small-amount transaction before the site is opened to customers.

eSewa Integration for Nepal Websites and Platforms

WooCommerce eSewa Integration

For Nepal businesses running WooCommerce - the WordPress e-commerce platform used by the majority of Nepal's online retailers - eSewa integration is implemented as a custom WooCommerce payment gateway plugin that adds eSewa as a payment method at checkout alongside any other configured payment options. WebApp Nepal's WooCommerce eSewa integration covers: payment gateway registration in WooCommerce's payment settings, merchant code and secret key configuration stored securely in the WooCommerce settings panel, HMAC-SHA256 signature generation on payment initiation using the order amount and WooCommerce order ID as the transaction_uuid seed, eSewa payment form submission to the correct endpoint (UAT for staging, production for live), success and failure URL handlers that process eSewa's return payload, server-to-server payment verification API call before WooCommerce order status is updated, WooCommerce order notes updated with eSewa's transaction reference number for reconciliation, and confirmation email triggered by WooCommerce's standard order completion hook after payment verification. The integration handles both successful payment and the cases where the customer abandons the eSewa payment page - returning the WooCommerce order to pending status so the customer can retry rather than creating a duplicate order.

Custom PHP eSewa Integration

For Nepal websites built on custom PHP frameworks - Laravel, CodeIgniter, or plain PHP - that are not WooCommerce-based, WebApp Nepal implements eSewa integration directly against the eSewa API using PHP's cURL library for the server-side verification calls. The integration is structured as a payment service class that encapsulates signature generation, payment form construction, response decoding, and verification API calls - keeping the eSewa-specific logic separate from the application's order management and business logic. Custom PHP integrations WebApp Nepal has built include: school and college fee collection systems where students pay examination fees, admission fees, or annual fees through eSewa; cooperative and savings institution contribution collection platforms; event and conference registration payment systems; and e-commerce platforms for Nepal businesses selling locally sourced products to domestic buyers. In each case the integration is scoped to the specific payment flows the application requires rather than a generic wrapper.

Node.js and Next.js eSewa Integration

For Nepal applications built on Node.js backends or Next.js with server-side API routes - a growing segment of Nepal's newer web application projects - WebApp Nepal implements eSewa integration using Node.js's built-in crypto module for HMAC-SHA256 signature generation and the fetch API or axios for eSewa's verification API calls. Next.js API routes are the integration point for Next.js projects: the payment initiation route generates the signed payment parameters and returns them to the frontend for form submission, and the verification route handles the post-payment callback, calls eSewa's verification API, and updates the order record. For React-based single-page applications that cannot safely hold the eSewa secret key in the browser, the signature generation and verification always happen in server-side API routes or a dedicated backend service - the secret key is never exposed to the browser's JavaScript environment. WebApp Nepal reviews the application's architecture before scoping Node.js or Next.js eSewa integrations to confirm the correct server-side security boundary.

React Native Mobile App eSewa Integration

Nepal mobile applications built in React Native and targeting Nepali users need eSewa integration that handles the mobile payment flow - which differs from the web browser flow because the eSewa payment page opens either in a WebView within the application or by deep-linking to the eSewa mobile app. WebApp Nepal implements eSewa payment integration for React Native applications with: backend API endpoints for payment initiation (generating signed parameters server-side) and payment verification (calling eSewa's verification API server-side), React Native WebView implementation for rendering the eSewa payment page within the app with URL change event handling to detect the eSewa redirect to the success or failure URL, and deep-link callback handling for applications that redirect to the eSewa app rather than a WebView. The payment verification call is always made from the backend API, not from the React Native app code, so the merchant secret key is never embedded in the mobile application binary.

eSewa Integration Security Considerations

Secret Key Management

The eSewa merchant secret key is the cryptographic credential that authenticates every payment initiation and verification request. Exposure of the secret key to the browser, to a public code repository, or to application logs is a serious security failure - a party who obtains the secret key can generate valid-looking payment signatures, potentially manipulating the payment flow. WebApp Nepal manages eSewa secret keys as server-side environment variables, never hard-coded in application source files that may be committed to version control repositories. For clients using shared hosting environments where environment variable management is limited, WebApp Nepal uses PHP-style configuration files stored outside the web root with restricted file permissions. The secret key is rotated at the merchant's request through the eSewa merchant portal, and WebApp Nepal updates the server-side configuration immediately when a rotation is required.

Idempotency and Duplicate Payment Prevention

A payment system that does not handle duplicate transaction submissions correctly can result in either double-payment (charging the customer twice) or double-fulfilment (fulfilling an order twice for one payment). eSewa's transaction_uuid uniqueness requirement handles the gateway side - eSewa rejects a second payment request with a transaction_uuid already used for a completed transaction. On the merchant side, WebApp Nepal's integrations use database-level constraints on the transaction_uuid field in the order payments table to prevent duplicate order completion even if the payment callback is received more than once (a scenario that can occur with network retries or browser reload on the success page). The combination of eSewa's gateway-side UUID deduplication and the merchant's database-level uniqueness constraint provides defence in depth against duplicate payment processing.

Handling the Abandoned Payment Case

A customer who starts the eSewa payment flow but closes the eSewa payment page without completing payment leaves the merchant's system with a pending order and no payment. If the merchant's system cancels the pending order on failure URL redirect, a customer who accidentally navigated away and wants to retry loses their order and must rebuild their cart. If the merchant's system holds the pending order indefinitely, the inventory held against pending orders grows without releasing. WebApp Nepal implements eSewa integrations with a defined pending order expiry - pending orders without a confirmed payment are automatically released after a configurable window (typically 30 to 60 minutes) through a scheduled background job, freeing inventory and allowing the customer to retry with a fresh order. The expiry window is configured to the merchant's business requirements - a high-value low-inventory item may require a shorter pending hold window than a digital product with unlimited inventory.

eSewa Integration for Specific Nepal Industries

Education – School and College Fee Collection

Nepal schools, colleges, and training institutions use eSewa merchant integration for fee collection because the student and parent population is eSewa's primary user demographic. Examination fees, admission fees, hostel fees, and monthly tuition are the payment types most frequently integrated. WebApp Nepal builds education fee payment systems where: the student logs in with their roll number or admission ID, the system displays the applicable fee heads and amounts for the current period, the student selects which fees to pay and proceeds to eSewa checkout, and after payment verification the system marks the fee as paid and generates a printable payment receipt. For institutions managing multiple payment periods and fee structures, the integration includes a fee management panel for administrative staff to configure fee amounts, due dates, and applicable student categories without requiring developer involvement for each cycle.

Trekking and Domestic Tourism

Nepal trekking agencies accepting bookings from domestic Nepali clients - and from NRN (Non-Resident Nepali) clients with eSewa accounts - use eSewa merchant integration for trek booking deposits and balance payments. The booking flow WebApp Nepal builds: the customer selects trek details and party size on the agency's website; the system calculates the deposit amount (typically 30% of the total trek price); the customer pays the deposit through eSewa; after verification the booking is confirmed and the customer receives a booking reference by email and SMS; the balance payment link is sent to the customer before the departure date. For agencies with an existing booking management system, eSewa integration is added as a payment channel within the existing system rather than requiring a new booking platform.

E-Commerce and Retail

Nepal's domestic e-commerce businesses - clothing retailers, grocery delivery services, electronics sellers, homewares and furnishings, Nepali food products and snacks - use eSewa as their primary payment method because it is the method most Nepali online shoppers already use. WooCommerce stores selling to Nepali domestic buyers implement eSewa alongside cash on delivery as the two primary checkout options. For businesses where cash on delivery carries high return and non-delivery risk, eSewa prepayment is the financially safer option - the merchant receives confirmed payment before dispatch. WebApp Nepal integrates eSewa into Nepal WooCommerce stores with the full checkout flow, order management, and reconciliation between WooCommerce order records and eSewa transaction references.

Cooperatives and Savings Institutions

Nepal cooperatives, savings and credit institutions, and microfinance organisations use eSewa merchant integration to collect member contributions, loan repayments, and insurance premiums digitally. Member contribution collection that previously required in-person branch visits or cash agent networks can be handled through a member self-service portal with eSewa payment. WebApp Nepal builds cooperative payment portals where members log in with their membership number, view their current contribution schedule and outstanding balance, and make payments directly through eSewa - with the payment record updated in the cooperative's management system automatically on payment verification. For cooperatives already operating core banking software, the eSewa payment integration is built as an API bridge between the payment gateway and the core banking system's transaction posting interface.

NGOs and Donation Platforms

Nepal NGOs and charity organisations accepting domestic donations use eSewa merchant integration to offer donors a one-click donation experience from their eSewa wallet. Donation campaigns for disaster relief, educational scholarships, and community development projects use eSewa because the donation amount can be as low as NPR 10 - the friction of a bank transfer is disproportionate for small donations, while eSewa makes small contributions as easy as a mobile top-up. WebApp Nepal builds eSewa donation payment pages for Nepal NGOs with configurable donation amounts, custom campaign messaging, a real-time donation counter, and automated donor acknowledgement with the eSewa transaction reference for donor records.

eSewa Integration Pricing in Nepal

eSewa merchant gateway integration by WebApp Nepal for a WooCommerce store - plugin development, HMAC-SHA256 signature implementation, sandbox testing, server-side verification, production validation, and documentation - costs NPR 20,000 to NPR 40,000. A custom eSewa integration for a non-WooCommerce Nepal application (PHP, Node.js, Next.js) with full server-side payment verification, order lifecycle management, and admin transaction log costs NPR 35,000 to NPR 70,000 depending on the complexity of the payment flow. eSewa integration for a React Native mobile application with backend API and WebView payment handling costs NPR 45,000 to NPR 80,000. Integration as part of a new website or application project - school fee system, booking platform, cooperative portal - is included within the overall project scope rather than priced as a separate add-on. eSewa's own merchant transaction fee applies separately and is disclosed by eSewa at merchant account registration - it is not part of WebApp Nepal's development fee.

Nepal businesses that have been losing completed carts at the payment step because the only option was bank transfer now have the correct infrastructure answer: eSewa merchant gateway integration, built on verified payment confirmation, server-side security, and the payment method eight million Nepali users already carry in their pocket. WebApp Nepal has built eSewa integrations for Nepal schools, cooperatives, e-commerce stores, booking platforms, and NGOs - each integration matched to the specific payment flow the business needed rather than a generic checkout template. The integration is a one-time technical project. The payment conversion it enables - and the bank transfers, WhatsApp confirmations, and abandoned carts it eliminates - is an ongoing commercial improvement. Contact WebApp Nepal to scope your eSewa merchant gateway integration and we will confirm the timeline, the technical approach, and the NPR cost before any development begins.

Testimonials

What Our Clients Say

5.0 out of 5 · 4 reviews
google

WebApp Nepal built our e-commerce store from scratch and it completely changed how we sell. Order management that used to take hours over WhatsApp now happens automatically through the site. Support after launch has been quick every time we've needed it.

VS

Vault Safe Nepal

MD, Vault Safe Nepal

facebook

Our old website barely worked on mobile. The team redesigned it mobile-first and our booking inquiries from phones nearly doubled in the first two months. Clear communication throughout the project.

SD

Sahadev Dhamala

Executive Member, Nepal Tourism Board

google

Solid work on our catalog website. There were a couple of rounds of revisions needed before the layout felt right, but the team was patient and got it there. Loading speed is noticeably better than our previous site.

MD

Mandeep Dahal

Founder, DMT Hub

google

We needed a bilingual Nepali-English website for our students and their parents, and WebApp Nepal handled the Devanagari formatting properly, which other developers we spoke to could not guarantee. Very happy with the result.

AG

Anisha Gurung

Director, Gurung Language Academy

Let's Build Something

Ready to Start
Your Project?

Tell us what you're building and we'll get back to you within a day with a clear, no-obligation quote.

Call Us

+977-9851198464

Email Us

[email protected]

Office

Ranibari, Kathmandu 44600, Bagmati Province, Nepal

Free guides
View all guides
Got Questions?

Frequently Asked Questions

The eSewa merchant payment gateway is a payment acceptance service that allows Nepal-registered businesses and individual sole proprietors to receive payments from eSewa wallet users on their websites, applications, and portals. The merchant is issued a merchant code (product code) and a secret key, which are used to sign payment requests and verify payment responses using HMAC-SHA256 cryptography. Payments received accumulate in the merchant's eSewa wallet and are settled to the merchant's linked Nepal bank account on request. WebApp Nepal integrates the eSewa merchant gateway for WooCommerce stores, custom PHP sites, Node.js and Next.js applications, and React Native mobile apps.

Any Nepal-registered business entity – private limited company, public limited company, partnership firm, sole proprietorship, NGO, INGO, cooperative, school, college, or hospital – can apply for an eSewa merchant account. Individual sole proprietors with a valid Nepal PAN registration can also open an eSewa merchant account. The account is linked to the business's registered mobile number and issued a merchant code used in all eSewa API transactions. WebApp Nepal advises clients on the documentation required and guides the application process before integration work begins.

For business entities, eSewa merchant account registration requires: company registration certificate, PAN certificate, memorandum of association or partnership deed, board resolution authorising the account signatory, and citizenship document of the authorised signatory. Sole proprietors require PAN registration and citizenship document. eSewa reviews the application and issues merchant credentials (merchant code, test credentials, and production credentials after account activation). The process typically takes three to seven business days from complete application submission. WebApp Nepal can begin sandbox integration development in parallel using eSewa's UAT test credentials before the production merchant account is issued.

HMAC-SHA256 is a cryptographic signing mechanism used in eSewa's payment gateway v2 to authenticate payment requests and verify payment responses. The merchant's secret key (issued at eSewa merchant account registration) is used to compute a hash of defined transaction parameters – total amount, transaction UUID, and product code. This signature is sent with the payment initiation request and eSewa verifies it before processing the payment. After payment, eSewa returns a signed response that the merchant's server verifies using the same mechanism before accepting the payment as confirmed. WebApp Nepal implements both signature generation on payment initiation and signature verification on payment result in every eSewa integration – without this bidirectional verification, the integration is vulnerable to payment amount manipulation and result parameter tampering.

A transaction UUID (universally unique identifier) is a unique string generated by the merchant's server for each payment transaction. eSewa requires that every payment initiation includes a transaction_uuid that has not been used for a previous completed transaction with the same merchant. The UUID is included in the payment initiation request, stored against the pending order record, and used in the post-payment verification API call to confirm the correct transaction was completed. Generating the UUID server-side (not in the browser) prevents replay attacks. WebApp Nepal generates transaction UUIDs server-side in every eSewa integration and stores them in the database for deduplication.

After a customer completes payment on eSewa's hosted payment page, eSewa redirects the customer to the merchant's success URL with a response payload. This redirect can be manipulated by a technically-informed user who modifies the URL parameters to simulate a successful payment without actually paying. Server-side verification calls eSewa's transaction status API from the merchant's backend with the transaction_uuid and total_amount to receive eSewa's authoritative confirmation of the payment – this call cannot be forged by the customer because it happens server-to-server with the merchant's authenticated credentials. WebApp Nepal makes this server-to-server verification call in every eSewa integration before marking any order as paid. Integrations that update order status on redirect without server verification are a payment fraud risk.

eSewa operates two API environments: the UAT (User Acceptance Testing) sandbox at rc-epay.esewa.com.np, used for development and testing with eSewa's provided test credentials and test eSewa accounts (no real money moves); and the production environment at epay.esewa.com.np, used for live transactions with real merchant credentials and real customer eSewa balances. WebApp Nepal builds all eSewa integrations in the UAT environment first, completing the full test scenario set before switching credentials. The UAT test secret key is publicly known for sandbox testing; the production secret key is issued only to the merchant and must be kept confidential.

WebApp Nepal integrates eSewa as a custom WooCommerce payment gateway plugin. The integration adds eSewa as a checkout payment option in WooCommerce, generates the HMAC-SHA256 signed payment parameters from the WooCommerce order data, submits the payment form to eSewa's correct endpoint, handles the success and failure URL callbacks, calls eSewa's verification API server-side before updating the WooCommerce order status to 'processing', adds the eSewa transaction reference to the WooCommerce order notes for reconciliation, and triggers WooCommerce's standard order confirmation email after verification. Pending orders where the customer abandoned the eSewa payment page are released after a configurable timeout. The integration is tested in sandbox before going live.

Yes. WebApp Nepal integrates eSewa into custom PHP websites and applications – Laravel, CodeIgniter, or plain PHP – using PHP's hash_hmac function for signature generation and cURL for eSewa's verification API calls. The integration is structured as a payment service class separate from the application's business logic. Custom PHP eSewa integrations WebApp Nepal has delivered include school and college fee collection systems, cooperative contribution portals, event registration payment systems, and domestic e-commerce platforms. A custom PHP eSewa integration with full server-side verification, order lifecycle management, and transaction logging typically costs NPR 35,000 to NPR 70,000.

Yes. WebApp Nepal integrates eSewa into Node.js and Next.js applications using Node.js's built-in crypto module for HMAC-SHA256 signature generation and fetch or axios for eSewa's verification API calls. For Next.js applications, payment initiation and verification are handled in server-side API routes – the eSewa secret key never reaches the browser. For React-based single-page applications calling a separate Node.js backend, the same server-side boundary applies. WebApp Nepal reviews the application's architecture before scoping Node.js or Next.js eSewa integrations to confirm that the secret key and verification logic are correctly placed on the server side.

Yes. WebApp Nepal integrates eSewa into React Native mobile applications using a combination of backend API endpoints (for server-side signature generation and payment verification) and React Native WebView (for rendering eSewa's hosted payment page within the app). The WebView monitors URL changes to detect eSewa's redirect to the success or failure URL, which triggers the backend verification API call. The eSewa secret key is stored only on the backend server – it is never embedded in the React Native app binary, where it could be extracted. React Native eSewa integration with backend API and WebView payment handling typically costs NPR 45,000 to NPR 80,000.

Payments received through the eSewa merchant gateway accumulate in the merchant's eSewa wallet balance. Settlement from the eSewa wallet to the merchant's linked Nepal bank account is initiated by the merchant through the eSewa merchant portal, or through an automated settlement schedule configured with eSewa. eSewa supports settlement to accounts at Nepal's major commercial banks. There is no automatic daily settlement by default – the merchant initiates transfers as needed. WebApp Nepal advises clients on settlement reconciliation practices so eSewa wallet balances are matched to the merchant's accounting records before bank transfer initiation.

eSewa charges a merchant service fee on transactions processed through the merchant gateway – a percentage of the transaction amount deducted before settlement to the merchant's eSewa wallet. The exact rate depends on the merchant category and is disclosed by eSewa at merchant account registration. Merchants should factor this fee into their product pricing and margin calculations. WebApp Nepal advises clients to confirm the applicable merchant fee rate with eSewa's merchant services team before launching the integration, so the fee is built into pricing rather than discovered as a surprise deduction after go-live. The fee is eSewa's charge and is separate from WebApp Nepal's integration development fee.

A customer who opens the eSewa payment page and then closes it without completing payment leaves a pending order in the merchant's system. WebApp Nepal implements eSewa integrations with a pending order expiry mechanism: pending orders without confirmed payment are automatically released after a configurable window (typically 30 to 60 minutes) by a scheduled background job. This releases any held inventory, cleans up the pending order queue, and allows the customer to retry by placing a new order. The expiry window is configured to the merchant's business requirements – shorter for limited-inventory products, longer for digital or unlimited-stock items.

Duplicate payment prevention in WebApp Nepal's eSewa integrations operates at two levels. At the gateway level, eSewa rejects a second payment request carrying a transaction_uuid already used for a completed transaction with the same merchant. At the merchant application level, the transaction_uuid field in the order payments table has a database-level uniqueness constraint that prevents duplicate order completion records even if the payment success callback is received more than once (which can happen with network retries or browser reload on the success page). Both defences are implemented in every eSewa integration WebApp Nepal delivers.

No. The eSewa merchant secret key must never be placed in browser JavaScript, a React Native app binary, or any client-side code. A secret key in client-side code can be extracted by any technically-informed user from the browser's developer tools or by decompiling the mobile app. A party with the secret key can generate valid-looking eSewa payment signatures, potentially manipulating the payment flow. WebApp Nepal stores the eSewa secret key exclusively as a server-side environment variable and uses it only in server-side code for signature generation and verification API calls. This is a non-negotiable security requirement in every eSewa integration WebApp Nepal builds.

Yes, and this is one of the most common eSewa merchant integration use cases WebApp Nepal delivers for Nepal educational institutions. Schools, colleges, and training centres integrate eSewa for examination fees, admission fees, hostel fees, and tuition collection. The integration allows students or parents to log in with a student ID or roll number, view applicable fee heads and outstanding amounts, and pay directly through eSewa. After payment verification, the fee record is updated and a receipt is generated for the student. For institutions with existing student management or ERP systems, the eSewa integration is built as a bridge to the existing system rather than a standalone payment page.

Yes. Nepal cooperatives, savings and credit institutions, and microfinance organisations use eSewa merchant integration to collect member contributions, loan repayments, and insurance premiums digitally. Members log in to a self-service portal with their membership number, view their contribution schedule and outstanding balance, and pay through eSewa. Payment verification updates the cooperative's records automatically. For cooperatives using core banking software, WebApp Nepal builds the eSewa integration as an API bridge between the payment gateway and the core banking system's transaction posting interface, so the payment record is posted correctly in the banking system without manual data entry.

WebApp Nepal tests every eSewa integration in eSewa's UAT sandbox environment before switching to production credentials. Sandbox testing covers: successful payment flow (UAT buyer completes payment, order status updates correctly, confirmation email or notification sends), payment abandoned flow (customer leaves eSewa payment page, order remains pending, no status update), HMAC signature validation with both correct and tampered signatures (tampered signature must be rejected), server-side verification API call confirming payment status, duplicate transaction UUID handling, and expiry of pending orders after the configured timeout. Only after all scenarios pass sandbox testing does the integration switch to production merchant credentials for a final live validation with a real small-amount transaction.

eSewa merchant gateway integration pricing at WebApp Nepal: WooCommerce eSewa plugin integration (plugin development, HMAC signing, sandbox testing, server-side verification, production validation) costs NPR 20,000 to NPR 40,000. Custom PHP, Node.js, or Next.js application integration with full server-side verification and transaction logging costs NPR 35,000 to NPR 70,000. React Native mobile app integration with backend API and WebView payment handling costs NPR 45,000 to NPR 80,000. Integration as part of a new website or application project (school fee system, cooperative portal, booking platform) is included within the overall project scope. eSewa's own merchant transaction fee applies separately and is not part of WebApp Nepal's development fee.

Two processes can run in parallel: (1) Apply for an eSewa merchant account through eSewa's merchant registration portal at esewa.com.np with your business registration documents, PAN certificate, and authorisation letter. eSewa issues merchant credentials after review, typically within three to seven business days. (2) Contact WebApp Nepal to scope the technical integration – we assess your website or application's architecture, advise on the correct integration approach (WooCommerce plugin, custom PHP, Node.js/Next.js, or React Native), and provide a proposal with timeline and NPR pricing. Development can begin in the UAT sandbox using eSewa's test credentials before your production merchant account is approved, so integration and testing can be completed in advance of the production credentials being issued.