$ npm install paymaster-api
- define environment variables
- PAYMASTER_LOGIN(with role Операционист or Бухгалтер)
- PAYMASTER_PASSWORD
- PAYMASTER_ID(optionally)
- require paymaster-api module
const paymaster = require('paymaster-api')
- run any method from https://paymaster.ru/docs/restapi.html
paymaster.listPaymentsFilter()
.then(({Overflow, Payments}) => {
console.log({Overflow, Payments})
})
.catch(error => {
console.error(error)
process.exit(error.code)
})