The PayWhirl Node library is provided to allow developers to access PayWhirl services without needing to write their own API wrappers.
The Documentation linked here and below contains all of the available methods for interacting with your PayWhirl account. If you would like to see additional functionality added, feel free to submit an issue or a pull request.
Table of Contents
- Node: ECMAScript 6+
Install the package with NPM:
$ npm install paywhirl --save
$ yarn add paywhirl
To create a new PayWhirl object, you need to pass in your API key and secret, which can be found in the API key section of the main site.
// index.js const PayWhirl = require('paywhirl'); const apiKey = 'pwpk_xxxxxxxxxxxxxxx'; const apiSecret = 'pwpsk_xxxxxxxxxxx'; const paywhirl = new PayWhirl(apiKey, apiSecret); paywhirl.getAccount().then(console.log);
If you need to create a single-file bundle, e.g. to deploy your code to certain serverless environments, a possible solution is to use ncc:
$ npm install @zeit/ncc --save-dev $ npx ncc index.js -o dist/
Please note that PayWhirl is not associated with
ncc and doesn't provide support for it.
PayWhirl Inc. and the names and logos for PayWhirl are trademarks of PayWhirl inc.