Use Dwolla’s SDK for Node to build applications that interact with the Dwolla API to perform account-to-account payment functions.
dwolla-v2
is available on NPM with source code available on our GitHub page.
Client
with key
and secret
replaced with the application key and secret that you fetched from one of the aforementioned links, respectively.
Client
, currently, you can make low-level HTTP requests. High-level abstraction is planned for this SDK; however, at the time of writing, it has not yet been fully implemented.
get()
, post()
, and delete()
methods. These methods will return a Promise
containing the response object.
The following snippet defines Dwolla’s response object, both with a successful and errored response. Although the snippet uses try
/catch
, you can also use .then()
/.catch()
if you prefer.
An errored response is returned when Dwolla’s servers respond with a status code that is greater than or equal to 400, whereas a successful response is when Dwolla’s servers respond with a 200-level status code.
GET
POST
DELETE
Accept
, Content-Type
, User-Agent
); however, if you would like to send additional headers, such as Idempotency-Key
, this can be done by passing in a third (3rd) argument for POST
requests.
To learn more about how to make your requests idempotent, check out our developer documentation on this topic!