This module is designed for manage API of Piastrix.
You absolutely need Node.js v6.0.0 or later or this won't work.
Install it from npm
const PiastrixApi = require('piastrix-api');
const PayWay = PiastrixApi.PayWay;
const Currency = PiastrixApi.Currency;
const api = new PiastrixApi({"shop_id": 1, "secret": 'secret'});
// Send request to /withdraw/create with {"amount": 10, "payway": PayWay['qiwi_rub'], "currency": Currency['rub']} params
api.withdraw.create({"amount": 10, "payway": PayWay['qiwi_rub'], "currency": Currency['rub']}).then(console.log).catch(console.error);
Using npm:
$ npm install piastrix-api
If you use it and you need more api methods, please make an issue and I will help you. Report bugs on the issue tracker