Demo project showing eSewa payment gateway integration in React.
⚠️ For educational/demo purposes only — no real transactions.
- What is eSewa?
- Merchant Account Setup
- Integration Flow
- React Example
- Test Credentials for Sandbox
- How to Run
- Resources
- Back to Top
eSewa is Nepal’s leading digital wallet and payment gateway.
Businesses can accept online payments using a merchant account.
- PAN/VAT certificate
- Company registration certificate
- Citizenship of directors/owners
- Bank account details
📧 Email: [email protected]
☎️ Toll-free: 01-5970123
🌐 eSewa Official
- User selects eSewa as payment option.
- Redirect to eSewa login page.
- User logs in and confirms payment.
- Redirect back to success/failure URL.
- eSewa sends IPN notification.
- Optional: verify transaction using eSewa API.
export default function EsewaForm() {
return (
<form
action="https://uat.esewa.com.np/epay/main"
method="POST"
className="space-y-4 bg-gray-900 p-6 rounded-xl shadow-lg"
>
<input type="hidden" name="amt" value="100" />
<input type="hidden" name="psc" value="0" />
<input type="hidden" name="pdc" value="0" />
<input type="hidden" name="txAmt" value="0" />
<input type="hidden" name="tAmt" value="100" />
<input type="hidden" name="pid" value="TEST_PRODUCT_001" />
<input type="hidden" name="scd" value="TEST_MERCHANT" />
<input type="hidden" name="su" value="http://localhost:5173/success" />
<input type="hidden" name="fu" value="http://localhost:5173/failure" />
<button
type="submit"
className="bg-green-500 text-white px-6 py-3 rounded-lg font-bold animate-pulse hover:scale-105 transition"
>
Pay with eSewa
</button>
</form>
);
}Use these demo credentials to test the integration:
| Field | Value |
|---|---|
| eSewa ID | 9806800001, 9806800002, 9806800003, 9806800004, 9806800005 |
| Password | Nepal@123 |
| MPIN | 1122 |
| Token | 123456 |
⚠️ Only for sandbox testing. Not for production.
- Using
9806800001as ID and1122as MPIN
- Using
123456as verification token
git clone https://github.com/your-username/esewa-integration-guide-react.git
cd esewa-integration-guide-reactInstall dependencies:
npm installStart the development server:
npm run devOpen http://localhost:5173 in your browser.
Fill in the form and click Pay with eSewa to test the integration in sandbox mode.


