GatewaysKhalti
Installation
Install Khalti package
Khalti Installation
Install Package
npm install @paybridgejs/khaltiOr with other package managers:
pnpm add @paybridgejs/khalti
yarn add @paybridgejs/khaltiGet Your Credentials
- Go to Khalti Dashboard
- Create a merchant account
- Navigate to Settings → API Keys
- Copy your Secret Key and Public Key
Environment Setup
Create a .env.local file:
KHALTI_SECRET_KEY=your_khalti_secret_key
KHALTI_PUBLIC_KEY=your_khalti_public_key⚠️ Keep your Secret Key private! Never commit it to version control.
Next: Configuration - Setup your Khalti client