Know of an official OpenAPI document? Contribute it →
For Agents
Initiate eSewa wallet payments for Nepali customers and verify the final transaction status before releasing goods or services.
Use for: I need to charge a Nepali customer through their eSewa wallet, Check whether an eSewa transaction completed successfully before shipping an order, Generate the HMAC signature required for an eSewa payment form submission, Retrieve the status of an eSewa transaction by its UUID
Not supported: Does not handle card vaulting, refunds, or payouts to merchant bank accounts - use for initiating and verifying eSewa wallet payments only.
Jentic publishes the only available OpenAPI specification for eSewa ePay API, keeping it validated and agent-ready. The eSewa ePay API lets merchants in Nepal accept payments through eSewa, Nepal's largest digital wallet, by redirecting customers to a hosted checkout form and verifying transactions afterwards. The integration is built around two HMAC-signed operations: initiating a payment with a unique transaction UUID and confirming the final status before fulfilment. Sandbox traffic is supported via the rc-epay.esewa.com.np host so merchants can rehearse the redirect, signature, and status-check flow before going live.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the eSewa ePay API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fesewa.com.np%2Fesewa" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fesewa.com.np%2Fesewa" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with eSewa ePay API.
Initiate an eSewa checkout redirect with a signed transaction UUID and amount payload
Verify a completed eSewa payment by transaction UUID before fulfilling an order
Generate HMAC SHA256 signatures for the signed_field_names body to authenticate requests
Switch between production (epay.esewa.com.np) and rc-epay sandbox hosts for end-to-end testing
Reconcile failed or cancelled checkout attempts using the transaction status response codes
Patterns agents use eSewa ePay API for, with concrete tasks.
★ Nepali e-commerce checkout with eSewa wallet
Merchants selling to customers in Nepal redirect shoppers from their cart to the eSewa hosted form, where the buyer authorises payment from their eSewa wallet balance, mobile banking, or linked card. The merchant then calls the transaction status endpoint with the same UUID to confirm settlement before releasing the order. Because eSewa is the dominant wallet in Nepal, this flow typically lifts conversion meaningfully versus card-only checkouts.
Initiate an eSewa payment of NPR 2500 for transaction UUID 'ord-9931' by POSTing to /api/epay/main/v2/form with the HMAC-signed payload, then confirm settlement via GET /api/epay/transaction/status.
Reconciliation of completed and failed eSewa transactions
Finance teams pull each completed checkout's status from /api/epay/transaction/status using the merchant transaction UUID and product code, matching it against internal order IDs. The endpoint returns a status string (COMPLETE, PENDING, FULL_REFUND, AMBIGUOUS, NOT_FOUND, CANCELED) so the team can flag stuck or refunded transactions and reissue or cancel orders accordingly. This avoids manually downloading dashboard reports.
For every order created today, call GET /api/epay/transaction/status with product_code 'EPAYTEST' and the order's transaction_uuid, then mark internal orders as paid, pending, or refunded based on the returned status.
Sandbox rehearsal before going live in production
Before switching to the live host, integrators run the full payment flow against rc-epay.esewa.com.np with the test merchant code to verify that signature generation, redirect handling, and status verification all behave correctly. This catches HMAC formatting errors and transaction_uuid collisions before any real money moves. The same payload structure is used in both environments, so once sandbox passes, the production cutover is just a host swap.
Submit a test payment of NPR 100 to https://rc-epay.esewa.com.np/api/epay/main/v2/form with merchant code 'EPAYTEST' and a fresh UUID, then verify the resulting status is COMPLETE before flipping the base URL to production.
AI agent collecting payments for a Nepali SaaS subscription
An AI agent acting on behalf of a Nepali SaaS provider discovers the eSewa ePay operations through Jentic's intent search, loads the input schema, and assembles a signed payment payload for the customer's subscription renewal. After redirecting the user, the agent polls the status endpoint until it returns COMPLETE and then activates the subscription in the SaaS database. Through Jentic, the merchant secret never leaves the vault.
Search Jentic for 'accept an eSewa wallet payment', load the /api/epay/main/v2/form schema, execute it with the customer's UUID and amount, then poll /api/epay/transaction/status until status is COMPLETE.
2 endpoints — jentic publishes the only available openapi specification for esewa epay api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/api/epay/main/v2/form
Initiate an eSewa hosted checkout redirect
/api/epay/transaction/status
Check the final status of an eSewa transaction by UUID
/api/epay/main/v2/form
Initiate an eSewa hosted checkout redirect
/api/epay/transaction/status
Check the final status of an eSewa transaction by UUID
What agents get from Jentic-routed access to this vendor.
Setup
Wiring eSewa ePay by hand means implementing its HMAC signature over the Authorization header, picking the right production or rc host, and verifying each transaction status yourself. Through Jentic you install once, import eSewa ePay from the API Directory, store the merchant secret key once, and your agent calls it.
Permission scoping
eSewa ePay carries the payment target in the request body rather than the URL path, so scope the agent to the operations it needs, such as initiating a payment form or checking transaction status. You choose which operations are allowed, so nothing beyond initiate and verify runs unless you add it.
Credential isolation
Your eSewa merchant secret key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'accept an eSewa payment' or 'check eSewa transaction status', and Jentic returns the matching eSewa ePay operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using eSewa ePay API through Jentic.
Why is there no official OpenAPI spec for eSewa ePay API?
eSewa does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call eSewa ePay API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.
What authentication does the eSewa ePay API use?
The eSewa ePay API uses an HMAC SHA256 signature derived from the merchant secret key, sent in the Authorization header. Through Jentic, the merchant secret is held encrypted in the vault and the agent only sees a scoped execution token, so the raw secret never enters the agent's prompt context.
Can I issue refunds with the eSewa ePay API?
The two endpoints in this spec only cover initiating a payment and querying its status; refunds are not available as a programmatic operation in this API. The transaction status response will surface FULL_REFUND when a refund has been issued through eSewa's merchant dashboard, so you can detect refunds even though you cannot trigger them here.
What are the rate limits for the eSewa ePay API?
eSewa does not document a public rate-limit policy for the ePay v2 endpoints. In practice, treat the form initiation endpoint as a per-checkout call and avoid polling the status endpoint more often than once every few seconds per transaction; back off on any non-2xx response.
How do I verify a payment with the eSewa ePay API through Jentic?
Use the Jentic search query 'check eSewa transaction status'. Jentic returns the GET /api/epay/transaction/status operation with its input schema (product_code, transaction_uuid, total_amount). Load it, execute with the merchant UUID, and the agent receives the parsed status response without handling the HMAC header directly.
Is the eSewa ePay API free to use?
Access to the API is free for approved merchants but eSewa charges a percentage commission on each successful transaction; the exact rate is set in your merchant agreement. Sandbox testing on rc-epay.esewa.com.np with the EPAYTEST merchant code does not incur fees.
Can I limit what my agent is allowed to do with the eSewa ePay API?
Yes. Because you run Jentic One yourself, your own rules decide which eSewa operations the agent may call and which credentials it may use. The eSewa ePay API exposes just two operations, initiating a payment form (POST /api/epay/main/v2/form) and checking transaction status (GET /api/epay/transaction/status), and you choose which of them the agent is allowed to run. Since the payment target travels in the request body rather than the URL, nothing beyond the operations you explicitly permit will run, so you can grant status checks alone or add payment initiation only when needed.
GET STARTED