All Projects → Dwolla → dwolla-v2-node

Dwolla / dwolla-v2-node

Licence: MIT License
Official Node Wrapper for Dwolla's API: https://developers.dwolla.com/api-reference/

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to dwolla-v2-node

messaging-apis
Messaging APIs for multi-platform
Stars: ✭ 1,759 (+5763.33%)
Mutual labels:  api-client
postmates-api
PHP API Client for Posmates
Stars: ✭ 16 (-46.67%)
Mutual labels:  api-client
zipa
General purpose REST API client #ep14boat
Stars: ✭ 74 (+146.67%)
Mutual labels:  api-client
laravel-quickbooks-client
SPINEN's Laravel Client for QuickBooks.
Stars: ✭ 25 (-16.67%)
Mutual labels:  api-client
jobs-stackoverflow
Making it easy to integrate with the Stack Overflow job board API
Stars: ✭ 17 (-43.33%)
Mutual labels:  api-client
square-java-sdk
Java client library for the Square API
Stars: ✭ 39 (+30%)
Mutual labels:  api-client
js-http-client
[DEPRECATED] Official Textile JS HTTP Wrapper Client
Stars: ✭ 29 (-3.33%)
Mutual labels:  api-client
pyiiko
Pyiiko is the easy-to-use library for iiko API
Stars: ✭ 14 (-53.33%)
Mutual labels:  api-client
eoLinker
在线 API 研发管理测试工具,最后能用的开源修复版本(4.0.1本地测试插件兼容3.5与4.0版本)。
Stars: ✭ 62 (+106.67%)
Mutual labels:  api-client
python-egnyte
Python client for the Egnyte Public API.
Stars: ✭ 16 (-46.67%)
Mutual labels:  api-client
Bittrex.Api.Client
A C# http client wrapper for the Bittrex cryptocurrency trading platform api
Stars: ✭ 14 (-53.33%)
Mutual labels:  api-client
pastebin-csharp
API client for Pastebin in C#
Stars: ✭ 25 (-16.67%)
Mutual labels:  api-client
enasearch
A Python library for interacting with ENA's API
Stars: ✭ 17 (-43.33%)
Mutual labels:  api-client
revolut-php
💳 PHP Bindings for the Revolut Business API
Stars: ✭ 37 (+23.33%)
Mutual labels:  api-client
fusionauth-node-client
Node.js client library for FusionAuth
Stars: ✭ 22 (-26.67%)
Mutual labels:  api-client
hcloud-rust
Unofficial Rust crate for accessing the Hetzner Cloud API
Stars: ✭ 22 (-26.67%)
Mutual labels:  api-client
dataiku-api-client-python
Python client for the DSS public API
Stars: ✭ 32 (+6.67%)
Mutual labels:  api-client
pixela
Pixela API client for Ruby
Stars: ✭ 23 (-23.33%)
Mutual labels:  api-client
bitmovin-go
Golang-Client which enables you to seamlessly integrate the new Bitmovin API into your existing projects
Stars: ✭ 49 (+63.33%)
Mutual labels:  api-client
jarling
A Java Library for the Starling Bank API
Stars: ✭ 14 (-53.33%)
Mutual labels:  api-client

DwollaV2 Node

Dwolla V2 Node client.

API Documentation

Installation

dwolla-v2 is available on NPM.

npm install dwolla-v2 --save

Getting started

var Client = require("dwolla-v2").Client;

var dwolla = new Client({
  key: process.env.DWOLLA_APP_KEY,
  secret: process.env.DWOLLA_APP_SECRET,
  environment: "sandbox", // defaults to 'production'
});

Integrations Authorization

Check out our Integrations Authorization Guide.

Making requests

Once you've created a Client, you can make requests using the #get, #post, and #delete methods. These methods return promises containing a response object detailed in the Responses section.

// GET api.dwolla.com/customers?limit=10&offset=20
dwolla
  .get("customers", { limit: 10, offset: 20 })
  .then((res) => console.log(res.body.total));

// POST api.dwolla.com/resource {"foo":"bar"}
dwolla
  .post("customers", {
    firstName: "Jane",
    lastName: "Doe",
    email: "[email protected]",
  })
  .then((res) => console.log(res.headers.get("location")));

// POST api.dwolla.com/resource multipart/form-data foo=...
var body = new FormData();
body.append("file", fs.createReadStream("mclovin.jpg"), {
  filename: "mclovin.jpg",
  contentType: "image/jpeg",
  knownLength: fs.statSync("mclovin.jpg").size,
});
body.append("documentType", "license");
dwolla.post(`${customerUrl}/documents`, body);

// DELETE api.dwolla.com/resource
dwolla.delete("resource");

Setting headers

To set additional headers on a request you can pass an object as the 3rd argument.

For example:

dwolla.post(
  "customers",
  { firstName: "John", lastName: "Doe", email: "[email protected]" },
  { "Idempotency-Key": "a52fcf63-0730-41c3-96e8-7147b5d1fb01" }
);

Responses

dwolla.get("customers").then(
  function(res) {
    // res.status   => 200
    // res.headers  => Headers { ... }
    // res.body     => Object or String depending on response type
  },
  function(error) {
    // when the server return a status >= 400
    // error.status   => 400
    // error.headers  => Headers { ... }
    // error.body     => Object or String depending on response type
  }
);

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Dwolla/dwolla-v2-node.

License

The gem is available as open source under the terms of the MIT License.

Changelog

  • 3.2.0 Add TypeScript definition (Thanks @rhuffy!)
  • 3.1.1 Change node-fetch import style for better Webpack compatibility
  • 3.1.0 Add integrations auth functionality
  • 3.0.2 Don't cache token errors
  • 3.0.1 Fix token leeway logic
  • 3.0.0 Token management changes
  • 2.1.0 Update dependencies
  • 2.0.1 Update dependencies
  • 2.0.0 Change token URLs, update dependencies, remove Node 0.x support.
  • 1.3.3 Update lodash to avoid security vulnerability (#25 - Thanks @bold-d!).
  • 1.3.2 Strip domain from URLs provided to token.* methods.
  • 1.3.1 Update sandbox URLs from uat => sandbox.
  • 1.3.0 Refer to Client id as key.
  • 1.2.3 Use Bluebird Promise in Auth to prevent Promise undefined error.
  • 1.2.2 Upgrade node-fetch dependency to fix form-data compatibility ([#15][/dwolla/dwolla-v2-node/issues/15])
  • 1.2.1 Add support for verified_account and dwolla_landing auth flags
  • 1.2.0 Reject promises with Errors instead of plain objects (#8)
  • 1.1.2 Fix issue uploading files (#4)
  • 1.1.1 Handle promises differently to allow all rejections to be handled (#5)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].