JSPM

np-payment-sdk

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q27074F
  • License MIT

Unified Payment SDK for Nepal (eSewa, Khalti, ConnectIPS, IME Pay, Mobile Banking)

Package Exports

  • np-payment-sdk
  • np-payment-sdk/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (np-payment-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

np-payment-sdk

Unified Payment SDK for Nepal

Features

  • Unified API Layer for multiple Nepali payment gateways (eSewa, Khalti, ConnectIPS, IME Pay, Mobile Banking)
  • Easy configuration
  • Callback & Webhook handlers
  • Sandbox & Production modes
  • TypeScript support

Installation

npm install np-payment-sdk

Usage Example

import { PaymentSDK, GatewayType } from 'np-payment-sdk';

const sdk = new PaymentSDK({
  mode: 'sandbox',
  gateways: {
    esewa: { clientId: '...', secret: '...' },
    khalti: { publicKey: '...', secretKey: '...' },
    // ...other gateways
  }
});

async function makePayment() {
  const result = await sdk.pay({
    gateway: GatewayType.ESEWA,
    amount: 1000,
    currency: 'NPR',
    returnUrl: 'https://yourapp.com/payment/callback',
  });
  console.log(result);
}

makePayment();

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

MIT # np-payment-sdk