1.0.7 • Published 6 years ago

node-qiwi v1.0.7

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

node-qiwi node-qiwi

node-qiwi

API for Qiwi Wallet.

Install

$ npm i node-qiwi -S

Tests

$ npm test

Docs

constructor(key)

ParameterTypeRequriedDescription
keystringyesAccess token for call API methods
const Qiwi = require('node-qiwi')

const wallet = new Qiwi(process.env.TOKEN)

Create wallet.

.getProfile(settings)

ParameterTypeRequriedDescription
settingsobjectnoExtra settings (see)
const profile = await wallet.getProfile()

Get profile.

.getBalance()

const balance = await wallet.getBalance()

Get balance.

.getHistory(contractId, settings)

ParameterTypeRequriedDescription
contractIdstringyesWallet's contractId
settingsobjectnoExtra settings (see)
const history = await wallet.getHistory(contractId)

Get history.

.getIdentification(contractId, body)

ParameterTypeRequriedDescription
contractIdstringyesWallet's contractId
bodyobjectyesIdentification's data
const identification = await wallet.getIdentification(contractId, {
  firstName: 'Иван',
  lastName: 'Иванов',
  middleName: 'Иванович',
  birthDate: '1998-02-11',
  passport: 4400111222
})

Get identification.

.getTransactionsStats(contractId, settings)

ParameterTypeRequriedDescription
contractIdstringyesWallet's contractId
settingsobjectyesExtra settings
settings.startDatedateyesStart date
settings.endDatedateyesEnd date
const stats = await wallet.getTransactionsStats(contractId, {
  startDate,
  endDate
})

Get transaction stats.

.getTransaction(transactionId, settings)

ParameterTypeRequriedDescription
transactionIdstringyesWallet's contractId
settingsobjectyesExtra settings
settings.typestringyesTransaction's type
const transaction = await wallet.getTransaction(transactionId, { type })

Get transaction.

.sendPayment(amount, account, comment)

ParameterTypeRequriedDescription
amountnumber/stringyesTransaction amount
accountnumber/stringyesRecipient's account
commentstringnoComment to transaction
const payment = await wallet.sendPayment(1, 37253676697, 'This is comment')

Send payment.

License

MIT.

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago