node-qiwi
API for Qiwi Wallet.
Install
$ npm i node-qiwi -S
Tests
$ npm test
Docs
- constructor(key)
- .getProfile(settings) ⇒
[Promise]
- .getBalance() ⇒
[Promise]
- .getHistory(contractId, settings) ⇒
[Promise]
- .getIdentification(contractId, body) ⇒
[Promise]
- .getTransactionsStats(contractId, settings) ⇒
[Promise]
- .getTransaction(transactionId, settings) ⇒
[Promise]
- .sendPayment(amount, account, comment) ⇒
[Promise]
constructor(key)
Parameter | Type | Requried | Description |
---|---|---|---|
key | string | yes | Access token for call API methods |
const Qiwi = const wallet = processenvTOKEN
Create wallet.
.getProfile(settings)
Parameter | Type | Requried | Description |
---|---|---|---|
settings | object | no | Extra settings (see) |
const profile = await wallet
Get profile.
.getBalance()
const balance = await wallet
Get balance.
.getHistory(contractId, settings)
Parameter | Type | Requried | Description |
---|---|---|---|
contractId | string | yes | Wallet's contractId |
settings | object | no | Extra settings (see) |
const history = await wallet
Get history.
.getIdentification(contractId, body)
Parameter | Type | Requried | Description |
---|---|---|---|
contractId | string | yes | Wallet's contractId |
body | object | yes | Identification's data |
const identification = await wallet
Get identification.
.getTransactionsStats(contractId, settings)
Parameter | Type | Requried | Description |
---|---|---|---|
contractId | string | yes | Wallet's contractId |
settings | object | yes | Extra settings |
settings.startDate | date | yes | Start date |
settings.endDate | date | yes | End date |
const stats = await wallet
Get transaction stats.
.getTransaction(transactionId, settings)
Parameter | Type | Requried | Description |
---|---|---|---|
transactionId | string | yes | Wallet's contractId |
settings | object | yes | Extra settings |
settings.type | string | yes | Transaction's type |
const transaction = await wallet
Get transaction.
.sendPayment(amount, account, comment)
Parameter | Type | Requried | Description |
---|---|---|---|
amount | number/string | yes | Transaction amount |
account | number/string | yes | Recipient's account |
comment | string | no | Comment to transaction |
const payment = await wallet
Send payment.
License
MIT.