node-paytm-api
v1.0.1
Published
Paytm internal API for Node.js
Downloads
10
Maintainers
Readme
Paytm's internal API for Node.js
Reverse engineered paytm's api wrapper written in Node.js
Instructions
Installation
Install using npm
$ npm install node-paytm-api
Usage
With Number and Password
You can simply require/import and use the Wrapper.
Example.
const Paytm = require('node-paytm-api')
const paytm = new Paytm({ number: '+919876543210', 'MyPassword' })
- after creating class instance you will be recieving OTP on your provided number.
- Then you can verify OTP using
verifyOtp
. The function will return Promise and you can have accessToken when resolved.
const accessToken = await paytm.verifyOtp('1234')
Note: AccessToken will be stored in class variable. Its only to use it later on.
With Access Token
You can use accessToken to initialize class instance too.
Example:
const paytm = new Paytm({ accessToken: '<your accessToken here>' })
Using Methods
| Method | Usage | Arguments | Return value |
| -------------- | --------------| ------------ | ------------ |
| getAccessToken | get accessToken when successfully authenticated | None | accessToken(String)
|
| getWalletHistory | retrieve wallet history of user. | (offset
: optional, limit
: optional) offset
- value to skip for front limit
- Retreival results for max at a time | object -> array of transaction history
(based on offset and limit)
Code Example
Credits
- HttpCanary
- Magisk
- Fiddler
- and ofc me :flushed: