{"id":18383451,"url":"https://github.com/dwolla/dwolla-v2-kotlin","last_synced_at":"2025-04-06T23:32:19.238Z","repository":{"id":37852338,"uuid":"189449029","full_name":"Dwolla/dwolla-v2-kotlin","owner":"Dwolla","description":"Official Dwolla SDK for Kotlin/Java","archived":false,"fork":false,"pushed_at":"2025-02-25T20:26:34.000Z","size":287,"stargazers_count":10,"open_issues_count":10,"forks_count":7,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-03-22T09:24:19.704Z","etag":null,"topics":["dwolla","dwolla-api","java","kotlin","sdk"],"latest_commit_sha":null,"homepage":"https://developers.dwolla.com","language":"Kotlin","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","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":"2019-05-30T16:42:33.000Z","updated_at":"2024-03-12T22:19:12.000Z","dependencies_parsed_at":"2024-11-06T01:11:48.253Z","dependency_job_id":"e34f5a30-f0dd-4119-9c3b-3f178052de0f","html_url":"https://github.com/Dwolla/dwolla-v2-kotlin","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dwolla","download_url":"https://codeload.github.com/Dwolla/dwolla-v2-kotlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569124,"owners_count":20959758,"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","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":["dwolla","dwolla-api","java","kotlin","sdk"],"created_at":"2024-11-06T01:11:35.547Z","updated_at":"2025-04-06T23:32:15.958Z","avatar_url":"https://github.com/Dwolla.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dwolla SDK for Kotlin\n\nThis repository contains the source code for Dwolla's Kotlin-based SDK, which allows developers to interact with Dwolla's server-side API via a Kotlin or JAVA API. 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**Dwolla’s Kotlin SDK is intended for server-side use and should not be used by itself when developing client-side Android apps. Instead, this SDK should be installed on your web server with your Android app proxying any interaction with Dwolla through it.**\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Initialization](#initialization)\n- [Making Requests](#making-requests)\n  - [High-Level Requests](#high-level-requests)\n  - [Low-Level Requests](#low-level-requests)\n- [Handling Errors](#handling-errors)\n- [Changelog](#changelog)\n- [Community](#community)\n- [Docker](#docker)\n- [Additional Resources](#additional-resources)\n\n## Getting Started\n\n### Installation\n\nTo begin using this SDK, you will first need to download it to your machine. You can use Maven or Gradle to do so, depending on which build tool your project is using.\n\n#### Maven\n\nAdd this to your project's POM:\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.Dwolla\u003c/groupId\u003e\n    \u003cartifactId\u003edwolla-v2-kotlin\u003c/artifactId\u003e\n    \u003cversion\u003e0.7.1/version\u003e\n\u003c/dependency\u003e\n```\n\n#### Gradle\n\nAdd this to your project's build file:\n\n```groovy\nrepositories {\n    // ...\n    maven(url = \"https://jitpack.io\") {\n        name = \"jitpack\"\n    }\n}\n```\n\n```groovy\ndependencies {\n    implementation(\"com.github.Dwolla:dwolla-v2-kotlin:0.7.1\")\n}\n```\n\n### Initialization\n\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 `Dwolla` with `key` and `secret` replaced with the application key and secret that you fetched from one of the aforementioned links, respectively.\n\n#### Kotlin\n\n```kotlin\nimport com.dwolla.Dwolla\nimport com.dwolla.DwollaEnvironment\n\nval dwolla = Dwolla(\n    key = \"YOUR_APP_KEY\",\n    secret = \"YOUR_APP_SECRET\",\n    environment = DwollaEnvironment.SANDBOX // defaults to PRODUCTION\n)\n```\n\n#### Java\n\n```java\nimport com.dwolla.Dwolla;\nimport com.dwolla.DwollaEnvironment;\n\nDwolla dwolla = new Dwolla(\n    \"YOUR_APP_KEY\",\n    \"YOUR_APP_SECRET\",\n    DwollaEnvironment.SANDBOX // defaults to PRODUCTION\n);\n```\n\n## Making Requests\n\nThe Dwolla client provides high-level and low-level methods for interacting with the Dwolla API.\n\n### High-Level Requests\n\n\u003e The best SDKs are not just simple; they’re intuitive. Developers would rather stay in the flow of their code than\n\u003e troubleshoot back-and-forth trying to figure out someone else’s code. Luckily, statically typed languages let us\n\u003e include information typically found in docs within type signatures.\n\u003e\n\u003e \u0026mdash; [Taking Our SDKs Higher](https://www.dwolla.com/updates/improving-sdks/)\n\nWhile the low-level methods are all you need, high-level methods exist to make things easier. They embed information\nyou would typically refer to the docs for in the SDK itself such as endpoints, request parameters, and response parameters.\n\nAs of now, a subset of the Dwolla API has high-level methods available:\n\n- [x] [`dwolla.accounts.*`](https://github.com/Dwolla/dwolla-v2-kotlin/blob/main/docs/snippets/high_level_requests/accounts.md)\n- [x] [`dwolla.beneficialOwners.*`](https://github.com/Dwolla/dwolla-v2-kotlin/blob/main/docs/snippets/high_level_requests/beneficial-owners.md)\n- [x] [`dwolla.businessClassifications.*`](https://github.com/Dwolla/dwolla-v2-kotlin/blob/main/docs/snippets/high_level_requests/business-classifications.md)\n- [x] [`dwolla.customers.*`](https://github.com/Dwolla/dwolla-v2-kotlin/blob/main/docs/snippets/high_level_requests/customers.md)\n- [x] [`dwolla.documents.*`](https://github.com/Dwolla/dwolla-v2-kotlin/blob/main/docs/snippets/high_level_requests/documents.md)\n- [x] [`dwolla.fundingSources.*`](https://github.com/Dwolla/dwolla-v2-kotlin/blob/main/docs/snippets/high_level_requests/funding-sources.md)\n- [x] [`dwolla.fundingSourcesTokens.*`](https://github.com/Dwolla/dwolla-v2-kotlin/blob/main/docs/snippets/high_level_requests/funding-sources-tokens.md)\n- [x] [`dwolla.root.*`](https://github.com/Dwolla/dwolla-v2-kotlin/blob/main/docs/snippets/high_level_requests/root.md)\n- [ ] `dwolla.events.*`\n- [ ] `dwolla.labels.*`\n- [ ] `dwolla.massPayments.*`\n- [ ] `dwolla.transfers.*`\n- [ ] `dwolla.webhooks.*`\n- [ ] `dwolla.webhookSubscriptions.*`\n\n### Low-Level Requests\n\nTo make low-level HTTP requests, you can use the `get()`, `post()`, and `delete()` methods.\n\n- `dwolla.get`\n- `dwolla.post`\n- `dwolla.delete`\n\nExamples:\n\n- [Kotlin](docs/snippets/low_level_requests/low_level_examples_kotlin.md)\n- [Java](docs/snippets/low_level_requests/low_level_examples_java.md)\n\n## Handling errors\n\nDwolla V2 Kotlin has 3 types of exceptions:\n\n```\nDwollaException\n├── DwollaApiException\n└── DwollaAuthException\n```\n\n- `DwollaApiException`: Thrown when the Dwolla API returns an error response. This could occur\n  for a variety of reasons such as invalid request parameters.\n- `DwollaAuthException`: Thrown when an error occurs obtaining authenticating with the API. You should not encounter\n  this exception unless your `Dwolla` key/secret are incorrect.\n- `DwollaException`: The base class other exceptions inherit from.\n\n##### Kotlin\n\n```kotlin\ntry {\n    dwolla.customers.list()\n} catch (e: DwollaApiException) {\n    e.message // String\n    e.statusCode // Int\n    e.headers // Headers\n    e.error // DwollaError\n} catch (e: DwollaAuthException) {\n    e.message // String\n    e.statusCode // Int\n    e.headers // Headers\n    e.error // OAuthError\n} catch (e: DwollaException) {\n    e.message // String\n    e.cause // Throwable?\n}\n```\n\n##### Java\n\n```java\ntry {\n    dwolla.customers.list();\n} catch (DwollaApiException e) {\n    String message = e.message;\n    Integer statusCode = e.statusCode;\n    Headers headers = e.headers;\n    DwollaError error = e.error;\n} catch (DwollaAuthException e) {\n    String message = e.message;\n    Integer statusCode = e.statusCode;\n    Headers headers = e.headers;\n    OAuthError error = e.error;\n} catch (DwollaAuthException e) {\n    String message = e.message;\n    Throwable cause = e.cause;\n}\n```\n\n## Changelog\n\n- [**0.7.1**](https://github.com/Dwolla/dwolla-v2-kotlin/releases/tag/0.7.1)\n  - Fix bug where `ExchangePartnersApi` did not have proper `@Throws` annotations\n- [**0.7.0**](https://github.com/Dwolla/dwolla-v2-kotlin/releases/tag/0.7.0)\n  - Add Exchanges and Exchange Partners high-level API methods\n- [**0.6.1**](https://github.com/Dwolla/dwolla-v2-kotlin/releases/tag/0.6.1)\n  - Add `firstName`, `lastName` and `dateOfBirth` as required arguments when upgrading an Unverified Customer to a Personal Verified Customer.\n- [**0.6.0**](https://github.com/Dwolla/dwolla-v2-kotlin/releases/tag/0.6.0)\n  - Add `correlationId` optional argument when creating a new customer\n  - Add `ForeignPassportNotAllowed` document failure reason. This is thrown when a foreign (non-U.S.) passport is uploaded for a personal Verified Customer.\n- [**0.5.0**](https://github.com/Dwolla/dwolla-v2-kotlin/releases/tag/0.5.0)\n  - Configure Dwolla environment to be more flexible to configuration\n- [**0.4.0**](https://github.com/Dwolla/dwolla-v2-kotlin/releases/tag/0.4.0)\n  - Updated `src/main/kotlin/com/dwolla/resource/documents/DocumentFailureReason.kt` to match failure reasons in [API Reference](https://developers.dwolla.com/api-reference/documents)\n  - Update `gradle` from 5.3.1 to 7.3.1\n- **0.3.0**\n  - Updated `CutomerApi` to include SSN when upgrading a customer to verified\n- [**0.2.0**](https://github.com/Dwolla/dwolla-v2-kotlin/releases/tag/0.2.0)\n  - Add `DwollaException` base exception class\n  - Swallow and rethrow exceptions using `DwollaException`\n- [**0.1.2**](https://github.com/Dwolla/dwolla-v2-kotlin/releases/tag/0.1.2)\n  - Add `delete` methods to `DwollaClient`\n- **0.1.1**\n  - Add serializer for `JsonBody` ([#13](/Dwolla/dwolla-v2-kotlin/pull/13))\n- **0.1.0**\n  - Refactoring\n    - `Client` =\u003e `Dwolla`\n    - `Environment` =\u003e `DwollaEnvironment`\n    - `DwollaException` =\u003e `DwollaApiException`\n    - `OAuthException` =\u003e `DwollaAuthException`\n  - Add OpenID support\n    - `dwolla.auth()`\n    - `dwolla.token()`\n    - `dwolla.refreshToken()`\n  - Additional high-level APIs\n    - `dwolla.accounts.*`\n    - `dwolla.beneficialOwners.*`\n    - `dwolla.fundingSources.*`\n    - `dwolla.fundingSourcesTokens.*`\n    - `dwolla.iavTokens.*`\n  - Refactored high-level APIs\n- **0.1.0-pre1**\n  - Initial release\n\n## Community\n\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-kotlin/issues/new).\n- If you would like to contribute to this library, [bug reports](https://github.com/Dwolla/dwolla-v2-kotlin/issues) and [pull requests](https://github.com/Dwolla/dwolla-v2-kotlin/pulls) are always appreciated!\n\n## Docker\n\nIf you prefer to use Docker to run dwolla-v2-kotlin locally, a Dockerfile file is included in the root directory. You can either build the Docker image with your API key and secret (by passing the values via CLI), or you can specify the values for the `app_key` and `app_secret` build arguments in Dockerfile. Finally, you will need to build and run the Docker image. More information on this topic can be found on [Docker's website](https://docs.docker.com/build/hellobuild/), or you can find some example commands below.\n\n##### Building Docker Container\n\n```shell\n# Building container by specifying build arguments.\n# In this configuration, you will not need to modify Dockerfile. All of the\n# necessary arguments are passed via Docker's `--build-arg` option.\n$ docker build \\\n    --build-arg app_key=YOUR_API_KEY \\\n    --build-arg app_secret=YOUR_APP_SECRET \\\n    -t dwolla/kotlin:latest .\n    \n# Building container without specifying build arguments.\n# In this configuration, you will need to specify your account API key and \n# secret (retrieved from Dwolla) in the Dockerfile file.\n$ docker build -t dwolla/kotlin:latest .\n```\n\n## Additional Resources\n\nTo learn more about Dwolla and how to integrate our product with your application, please consider visiting 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 Node](https://github.com/Dwolla/dwolla-v2-node)\n  - [Dwolla SDK for Python](https://github.com/Dwolla/dwolla-v2-python)\n  - [Dwolla SDK for PHP](https://github.com/Dwolla/dwolla-swagger-php)\n  - [Dwolla SDK for Ruby](https://github.com/Dwolla/dwolla-v2-ruby)\n- [Developer Support Forum](https://discuss.dwolla.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolla%2Fdwolla-v2-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwolla%2Fdwolla-v2-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolla%2Fdwolla-v2-kotlin/lists"}