{"id":18383483,"url":"https://github.com/dwolla/dwolla-v2-node","last_synced_at":"2025-08-01T07:34:24.100Z","repository":{"id":6960892,"uuid":"55806766","full_name":"Dwolla/dwolla-v2-node","owner":"Dwolla","description":"Official Node Wrapper for Dwolla's API","archived":false,"fork":false,"pushed_at":"2023-03-02T18:16:16.000Z","size":466,"stargazers_count":44,"open_issues_count":4,"forks_count":29,"subscribers_count":25,"default_branch":"main","last_synced_at":"2024-04-14T12:18:49.941Z","etag":null,"topics":["api","dwolla","javascript","nodejs","sdk","sdk-nodejs"],"latest_commit_sha":null,"homepage":"https://developers.dwolla.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dwolla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-08T20:09:11.000Z","updated_at":"2023-08-28T20:34:49.000Z","dependencies_parsed_at":"2024-11-06T01:11:53.432Z","dependency_job_id":"040a9a25-ea08-4a30-9049-76dac5245650","html_url":"https://github.com/Dwolla/dwolla-v2-node","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/Dwolla/dwolla-v2-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dwolla","download_url":"https://codeload.github.com/Dwolla/dwolla-v2-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268185559,"owners_count":24209392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","dwolla","javascript","nodejs","sdk","sdk-nodejs"],"created_at":"2024-11-06T01:11:40.322Z","updated_at":"2025-08-01T07:34:23.998Z","avatar_url":"https://github.com/Dwolla.png","language":"JavaScript","readme":"# Dwolla SDK for JavaScript\n\nThis repository contains the source code for Dwolla's Node-based SDK, which allows developers to interact with Dwolla's [server-side API](https://developers.dwolla.com/api-reference) via a JavaScript API, with automatic OAuth token management included. Any action that can be performed via an HTTP request can be made using this SDK when executed within a server-side environment.\n\n## Table of Contents\n\n* [Getting Started](#getting-started)\n  * [Installation](#installation)\n  * [Initialization](#initialization)\n* [Making Requests](#making-requests)\n  * [Low-Level Requests](#low-level-requests)\n    * [`GET`](#get)\n    * [`POST`](#post)\n    * [`DELETE`](#delete)\n    * [Setting Headers](#setting-headers)\n* [Changelog](#changelog)\n* [Community](#community)\n* [Additional Resources](#additional-resources)\n\n## Getting Started\n\n### Installation\nTo begin using this SDK, you will first need to download and install it on your machine. We use [npm](https://www.npmjs.com/package/dwolla-v2) to distribute this package.\n\n```shell\n# npm\n$ npm install --save dwolla-v2\n\n# yarn\n$ yarn add dwolla-v2\n\n# pnpm\n$ pnpm add dwolla-v2\n```\n\n### Initialization\nBefore any API requests can be made, you must first determine which environment you will be using, as well as fetch the application key and secret. To fetch your application key and secret, please visit one of the following links:\n\n* Production: https://dashboard.dwolla.com/applications\n* Sandbox: https://dashboard-sandbox.dwolla.com/applications\n\nFinally, you can create an instance of `Client` with `key` and `secret` replaced with the application key and secret that you fetched from one of the aforementioned links, respectively.\n\n```javascript\nconst Client = require(\"dwolla-v2\").Client;\n\nconst dwolla = new Client({\n    environment: \"sandbox\", // Defaults to \"production\"\n    key: process.env.DWOLLA_APP_KEY,\n    secret: process.env.DWOLLA_APP_SECRET\n})\n```\n\n## Making Requests\n\nOnce you've created a `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.\n\n### Low-Level Requests\n\nTo make low-level HTTP requests, you can use the [`get()`](#get), [`post()`](#post), and [`delete()`](#delete) methods. These methods will return a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) containing the response object.\n\nThe following snippet defines Dwolla's response object, both with a successful and errored response. Although the snippet uses [`try`/`catch`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch), you can also use [`.then()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then)/[`.catch()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch) if you prefer.\n\nAn 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.\n\n```javascript\ntry {\n    const response = await dwolla.get(\"customers\");\n    // response.body      =\u003e Object or String depending on response type\n    // response.headers   =\u003e Headers { ... }\n    // response.status    =\u003e 200\n} catch(error) {\n    // error.body       =\u003e Object or String depending on response type\n    // error.headers    =\u003e Headers { ... }\n    // error.status     =\u003e 400\n}\n```\n\n#### `GET`\n\n```javascript\n// GET https://api.dwolla.com/customers?offset=20\u0026limit=10\nconst response = await dwolla.get(\"customers\", {\n    offset: 20,\n    limit: 10\n});\n\nconsole.log(\"Response Total: \", response.body.total);\n```\n\n#### `POST`\n\n```javascript\n// POST https://api.dwolla.com/customers body={ ... }\n// This request is not idempotent since `Idempotecy-Key` is not passed as a header\nconst response = await dwolla.post(\"customers\", {\n    firstName: \"Jane\",\n    lastName: \"Doe\",\n    email: \"jane.doe@example.com\"\n});\n\nconsole.log(\"Created Resource: \", response.headers.get(\"Location\"));\n\n// POST https://api.dwolla.com/customers/{id}/documents multipart/form-data ...\n// Note: Requires form-data peer dependency to be downloaded and installed\nconst formData = new FormData();\nformData.append(\"documentType\", \"license\");\nformData.append(\"file\", ffs.createReadStream(\"mclovin.jpg\", {\n    contentType: \"image/jpeg\",\n    filename: \"mclovin.jpg\",\n    knownLength: fs.statSync(\"mclovin.jpg\").size\n}));\n\nconst response = await dwolla.post(`${customerUrl}/documents`, formData);\nconsole.log(\"Created Resource: \", response.headers.get(\"Location\"));\n```\n\n#### `DELETE`\n\n```javascript\n// DELETE https://api.dwolla.com/[resource]\nawait dwolla.delete(\"resource\");\n```\n\n#### Setting Headers\n\nWhen a request is sent to Dwolla, a few headers are automatically sent (e.g., `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.\n\nTo learn more about how to make your requests idempotent, check out our [developer documentation](https://developers.dwolla.com/api-reference#idempotency-key) on this topic!\n\n```javascript\n// POST https://api.dwolla.com/customers body={ ... }  headers={ ..., Idempotency-Key=... }\n// This request is idempotent since `Idempotency-Key` is passed as a header\nconst response = await dwolla.post(\"customers\", {\n    firstName: \"Jane\",\n    lastName: \"Doe\",\n    email: \"jane.doe@example.com\"\n}, {\n    \"Idempotency-Key\": \"[RANDOMLY_GENERATED_KEY_HERE]\"\n});\n```\n\n## Changelog\n\n- **[3.4.0](https://github.com/Dwolla/dwolla-v2-node/releases/tag/v3.4.0)** Update `form-urlencoded` version to allow `{ skipIndex: true, skipBracket: true }` options to be passed in. Thanks, [@MarcMouallem](https://github.com/MarcMouallem)!\n- **3.3.0** Remove `lodash` as a dependency in favor of `Object.assign`\n- **3.2.3** Update version and changelog\n- **3.2.2** Update unit test involving token. Thanks, [@philting](https://github.com/philting)!\n- **3.2.1** Update dependencies. Remove `npm-check` package.\n- **3.2.0** Add TypeScript definition. Thanks, [@rhuffy](https://github.com/rhuffy)!\n- **3.1.1** Change `node-fetch` import style for better Webpack compatibility\n- **3.1.0** Add integrations auth functionality\n- **3.0.2** Don't cache token errors\n- **3.0.1** Fix token leeway logic\n- **3.0.0** Token management changes\n- **2.1.0** Update dependencies\n- **2.0.1** Update dependencies\n- **2.0.0** Change token URLs, update dependencies, remove Node 0.x support.\n- **1.3.3** Update lodash to avoid security vulnerability. Thanks, [@bold-d](https://github.com/bold-d)!\n- **1.3.2** Strip domain from URLs provided to `token.*` methods.\n- **1.3.1** Update sandbox URLs from uat =\u003e sandbox.\n- **1.3.0** Refer to Client ID as key.\n- **1.2.3** Use Bluebird Promise in Auth to prevent Promise undefined error.\n- **1.2.2** Upgrade `node-fetch` dependency to fix `form-data` compatibility\n- **1.2.1** Add support for `verified_account` and `dwolla_landing` auth flags\n- **1.2.0** Reject promises with Errors instead of plain objects\n- **1.1.2** Fix issue uploading files\n- **1.1.1** Handle promises differently to allow all rejections to be handled\n\n## Community\n* If you have any feedback, please reach out to us on [our forums](https://discuss.dwolla.com/) or by [creating a GitHub issue](https://github.com/Dwolla/dwolla-v2-node/issues/new).\n* If you would like to contribute to this library, [bug reports](https://github.com/Dwolla/dwolla-v2-node/issues) and [pull requests](https://github.com/Dwolla/dwolla-v2-node/pulls) are always appreciated!\n\n## Docker\n\nIf you prefer to use Docker to run dwolla-v2-node locally, a Dockerfile is included at the root directory.\nFollow these instructions from [Docker's website](https://docs.docker.com/build/hellobuild/) to create a Docker image from the Dockerfile, and run it.\n\n## Additional Resources\n\nTo learn more about Dwolla and how to integrate our product with your application, please consider visiting some of the following resources and becoming a member of our community!\n\n* [Dwolla](https://www.dwolla.com/)\n* [Dwolla Developers](https://developers.dwolla.com/)\n* [SDKs and Tools](https://developers.dwolla.com/sdks-tools)\n  * [Dwolla SDK for C#](https://github.com/Dwolla/dwolla-v2-csharp)\n  * [Dwolla SDK for Kotlin](https://github.com/Dwolla/dwolla-v2-kotlin)\n  * [Dwolla SDK for PHP](https://github.com/Dwolla/dwolla-swagger-php)\n  * [Dwolla SDK for Python](https://github.com/Dwolla/dwolla-v2-python)\n  * [Dwolla SDK for Ruby](https://github.com/Dwolla/dwolla-v2-ruby)\n* [Developer Support Forum](https://discuss.dwolla.com/)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolla%2Fdwolla-v2-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwolla%2Fdwolla-v2-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolla%2Fdwolla-v2-node/lists"}