phonepepg
v0.1.0
Published
Easily integrate PhonePe Payment Gateway
Downloads
95
Maintainers
Readme
Easily integrate PhonePe Payment Gateway
⚠️ You Need a PhonePe Business account to use this
If you dont have have an account create one by the following link
Create PhonePe Business Account
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
Copyright (c) 2024