phonepepg
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Easily integrate PhonePe Payment Gateway

PhonePe PG

⚠️ You Need a PhonePe Business account to use this

If you dont have have an account create one by the following link


Getting Started

This package package can be used for server-side working with Node.js or Other Server ation supported frameworks like Next.js etc

Install the Package

npm i phonepepg

Usage

Required Parameters:

param required
merchantId true
saltKey true
isDev false

Create an Instance of PhonepeGateway

import PhonepeGateway from 'phonepepg';

const gateway = new PhonepeGateway({
    merchantId: 'MYMERCHANTID',
    saltKey: 'XXXXXXXXXXXXXXXXXXX',
    saltIndex: 1,
    isDev: true // false for production
  });

Initialize Payment

const resp = await gateway.initPayment({
    amount:100, 
    transactionId:'TR12345', 
    userId:'userid', 
    redirectUrl:'https://mysite.com/payredirect',
    callbackUrl:'https://mysite.com/callback'
    });

Get Payment Status

const resp = await gateway.paymentStatus(transactionId);

Get Checksum

const checksome = gateway.getChecksum(transactionId);

Contribute

This package is still in development. Click to Contribute

License

MIT License

Copyright (c) 2024

ziqx.cc

Package Sidebar

Install

npm i phonepepg

Weekly Downloads

7

Version

0.1.0

License

MIT

Unpacked Size

23.6 kB

Total Files

9

Last publish

Collaborators

  • fathah_cr