{"id":18383393,"url":"https://github.com/dwolla/dwolla-v2-csharp","last_synced_at":"2025-04-06T23:32:14.125Z","repository":{"id":22345024,"uuid":"95845705","full_name":"Dwolla/dwolla-v2-csharp","owner":"Dwolla","description":"Official C# Wrapper for Dwolla's API","archived":false,"fork":false,"pushed_at":"2024-11-05T22:47:21.000Z","size":219,"stargazers_count":12,"open_issues_count":6,"forks_count":16,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-03-22T09:11:52.710Z","etag":null,"topics":["api","dwolla","sdk","sdk-c-sharp"],"latest_commit_sha":null,"homepage":"https://developers.dwolla.com","language":"C#","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":"2017-06-30T03:43:21.000Z","updated_at":"2025-03-12T21:56:39.000Z","dependencies_parsed_at":"2024-07-31T19:55:44.792Z","dependency_job_id":"7c5c87eb-007d-4805-a8b1-cbef18f7cade","html_url":"https://github.com/Dwolla/dwolla-v2-csharp","commit_stats":{"total_commits":83,"total_committers":9,"mean_commits":9.222222222222221,"dds":"0.49397590361445787","last_synced_commit":"086367abbe32d7f44607fa930455e232169e13b1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dwolla","download_url":"https://codeload.github.com/Dwolla/dwolla-v2-csharp/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":["api","dwolla","sdk","sdk-c-sharp"],"created_at":"2024-11-06T01:11:14.994Z","updated_at":"2025-04-06T23:32:11.234Z","avatar_url":"https://github.com/Dwolla.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dwolla SDK for C#\n\nThis repository contains the source code for Dwolla's C#-based SDK, which allows developers to\ninteract with Dwolla's server-side API via a C# API. Any action that can be performed via an HTTP\nrequest 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    - [Tokens](#tokens)\n- [Making Requests](#making-requests)\n  - [Low-Level Requests](#low-level-requests)\n    - [Setting Headers](#setting-headers)\n    - [GET](#get)\n    - [POST](#post)\n    - [DELETE](#delete)\n  - [Example App](#example-app)\n    - [Docker](#docker)\n- [Changelog](#changelog)\n- [Community](#community)\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. We use\n[NuGet](https://www.nuget.org/packages/Dwolla.Client) to distribute this package. Check out the\n[Microsoft](https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio)\ndocumentation for more information on how to install and manage packages from Nuget using Visual\nStudio.\n\nHere's an example using the\n[Package Manager Console](https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-powershell?view=vsmac-2022)\n\n```shell\n$ Install-Package Dwolla.Client -Version 5.2.2\n```\n\n### Initialization\n\nBefore any API requests can be made, you must first determine which environment you will be using,\nas well as fetch the application key and secret. To fetch your application key and secret, please\nvisit 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 `DwollaClient` by specifying which environment you will be\nusing—Production or Sandbox—via the `isSandbox` boolean flag.\n\n```csharp\nvar client = DwollaClient.Create(isSandbox: true);\n```\n\n#### Tokens\n\nApplication access tokens are used to authenticate against the API on behalf of an application.\nApplication tokens can be used to access resources in the API that either belong to the application\nitself (`webhooks`, `events`, `webhook-subscriptions`) or the Dwolla Account that owns the\napplication (`accounts`, `customers`, `funding-sources`, etc.). Application tokens are obtained by\nusing the [`client_credentials`](https://tools.ietf.org/html/rfc6749#section-4.4) OAuth grant type:\n\n```csharp\nvar tokenRes = await client.PostAuthAsync\u003cAppTokenRequest, TokenResponse\u003e(\n    new Uri($\"{client.AuthBaseAddress}/token\"),\n    new AppTokenRequest {Key = \"...\", Secret = \"...\"});\n```\n\n_Application access tokens are short-lived: 1 hour. They do not include a `refresh_token`. When it\nexpires, generate a new one using `AppTokenRequest`._\n\n## Making Requests\n\nOnce you've created a `DwollaClient`, currently, you can make low-level HTTP requests.\n\n### Low-Level Requests\n\nTo make low-level HTTP requests, you can use the `GetAsync()`, `PostAsync()`, `UploadAsync()` and\n`DeleteAsync()` methods with the available\n[request models](https://github.com/Dwolla/dwolla-v2-csharp/blob/main/Dwolla.Client/Models/Requests).\nThese methods will return responses that can be mapped to one of the available\n[response models](https://github.com/Dwolla/dwolla-v2-csharp/blob/main/Dwolla.Client/Models/Responses).\n\n#### Setting Headers\n\nTo specify headers for a request (e.g., `Authorization`), you can pass a `Headers` object as the\nlast argument.\n\n```csharp\nvar headers = new Headers {{\"Authorization\", $\"Bearer {tokenRes.Content.Token}\"}};\nclient.GetAsync\u003cGetCustomersResponse\u003e(url, headers);\n```\n\n#### `GET`\n\n```csharp\n// GET api.dwolla.com/customers\nvar url = new Uri(\"https://api.dwolla.com/customers\");\nclient.GetAsync\u003cGetCustomersResponse\u003e(url);\n```\n\n#### `POST`\n\n```csharp\n// POST api.dwolla.com/customers\nvar url = new Uri(\"https://api.dwolla.com/customers/\");\nvar request = new CreateCustomerRequest\n{\n  FirstName = \"Jane\",\n  LastName = \"Doe\",\n  Email = \"jane.doe@email.com\"\n};\nvar res = await PostAsync\u003cCreateCustomerRequest, EmptyResponse\u003e(url, request, headers);\n//res.Response.Headers.Location =\u003e \"https://api-sandbox.dwolla.com/customers/fc451a7a-ae30-4404-aB95-e3553fcd733f\n\n// POST api.dwolla.com/customers/{id}/documents multipart/form-data foo=...\nvar url = new Uri(\"https://api-sandbox.dwolla.com/customers/{id}/documents\");\nvar request = new UploadDocumentRequest\n{\n    DocumentType = \"idCard\",\n    Document = new File\n    {\n        ContentType = \"image/png\",\n        Filename = \"filename.jpg\",\n        Stream = fileStream\n    }\n};\nclient.UploadAsync\u003cUploadDocumentRequest, EmptyResponse\u003e(url, request, headers);\n```\n\n#### `DELETE`\n\n```csharp\n// DELETE api.dwolla.com/resource\nvar url = \"https://api.dwolla.com/labels/{id}\"\nclient.DeleteAsync\u003cobject\u003e(url, null);\n```\n\n### Example App\n\nTake a look at the\n[Example Application](https://github.com/Dwolla/dwolla-v2-csharp/tree/main/ExampleApp) for examples\non how to use the available C# models to call the Dwolla API. Before you can begin using the app,\nhowever, you will need to specify a `DWOLLA_APP_KEY` and `DWOLLA_APP_SECRET` environment variable.\n\n#### Docker\n\nIf you prefer to use Docker to run ExampleApp locally, a Dockerfile file is included in the root\ndirectory. You can either build the Docker image with your API key and secret (by passing the values\nvia CLI), or you can specify the values for the `app_key` and `app_secret` build arguments in\nDockerfile. Finally, you will need to build and run the Docker image. More information on this topic\ncan be found on [Docker's website](https://docs.docker.com/build/hellobuild/), or you can find some\nexample 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/csharp-example-app: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/csharp-example-app:latest .\n```\n\n##### Running Container Instance\n\n```shell\n# Running Docker container in interactive shell\n$ docker run --init -it dwolla/csharp-example-app:latest\n```\n\n## Changelog\n\n- [**6.0.1**](https://github.com/Dwolla/dwolla-v2-csharp/releases/tag/6.0.1)\n  - Fix issue [#56](https://github.com/Dwolla/dwolla-v2-csharp/issues/56) reported by [@StevP116](https://github.com/StevP116) and [@jacob-ezlandlord](https://github.com/jacob-ezlandlord), addressing a deserialization bug where quoted numeric values in responses (such as `amount.value`) caused a `DeserializationException`. The `JsonSerializerOptions` in `DwollaClient` has been updated with `JsonNumberHandling.AllowReadingFromString` to support both quoted and unquoted numeric values, ensuring compatibility with varied API responses. \n  - Backward Compatibility - This update does not introduce any breaking changes, allowing existing integrations to continue functioning without modifications. \n  - Thanks to [@StevP116](https://github.com/StevP116) for recommending a straightforward fix and to everyone who contributed insights. 🎉\n  - File Name Correction: Renamed `LableLedgerEntry.cs` to `LabelLedgerEntry.cs` to fix a typo in the file name. This change does not impact the functionality of existing integrations.\n- [**6.0.0**](https://github.com/Dwolla/dwolla-v2-csharp/releases/tag/6.0.0)\n  - Fix issue [#41](https://github.com/Dwolla/dwolla-v2-csharp/issues/47) reported by,\n    [@waynebrantley](https://github.com/waynebrantley)\n    - Upgrade the target framework to `netstandard2.0` in line with Microsoft's recommendation to\n      avoid targeting `netstandard1.x`. Users of the SDK will need to update their applications to\n      target `netstandard2.0` or a later version to use the updated SDK.\n    - Replace `Newtonsoft.Json` with `System.Text.Json` to remove external dependencies.\n  - Configure static `HttpClient` in `DwollaClient` to adhere to\n    [Microsoft's HttpClient guidelines for .NET](https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/http/httpclient-guidelines#recommended-use).\n  - Special thanks to [@natehitz](https://github.com/natehitze) and\n    [@IsaiahDahlberg](https://github.com/IsaiahDahlberg) for their contributions to this release!\n    🙌\n- [**5.4.0**](https://github.com/Dwolla/dwolla-v2-csharp/releases/tag/5.4.0)\n  - Fix issue with deserialization of `200 Ok` response with an `_embedded` error on GET customer.\n    Issue [#47](https://github.com/Dwolla/dwolla-v2-csharp/issues/47). (Thanks,\n    [@dahlbyk](https://github.com/dahlbyk)!)\n  - Add missing fields to Customer response schema - `Embedded`, `CorrelationID`, `BusinessType`,\n    `BusinessClassification`.\n- [**5.3.0**](https://github.com/Dwolla/dwolla-v2-csharp/releases/tag/5.3.0)\n  - Add API models and examples for Exchanges\n  - Add Trace ID under AchDetails object\n- **5.2.2** Update `Newtonsoft.Json` to version 13.0.1\n- **5.2.1** Add Masspayment models and examples, support RTP transfers\n- **5.2.0** Change Token URLs and Add Labels models and examples\n- **5.1.1** Update Content-Type and Accept headers for Token URLs\n- **5.1.0** Change Token URLs\n- **5.0.16** Add missing `using` to ExampleApp\n- **5.0.15** Upgrade dependencies and Dwolla.Client.Tests and ExampleApp to `netcoreapp2.0`.\n  Breaking changes:\n  - DwollaClient no longer throws on API errors, they should be properly deserialized into\n    RestResponse.Error instead\n  - DwollaException, RestException, and RestResponse.Exception are removed\n  - Use `EmptyResponse` instead of `object` in DwollaClient inteface\n- **4.0.14** Ignore null values in JSON POST requests\n- **4.0.13** Add Beneficial Owner models and examples\n- **4.0.12** Add Controller models\n- **4.0.11** Add document failure reason\n- **4.0.10** Add Micro Deposit models\n- **4.0.9** Add Document models, support transfer fees\n- **4.0.8** Add Transfer models, expose raw response on RestResponse\n- **4.0.7** Add Micro Deposit and Balance models\n- **4.0.6** Breaking change: Remove CreateCustomerRequest.Status. Add UpdateCustomerRequest\n- **3.0.5** Breaking change: CreateCustomerRequest.DateOfBirth `string` -\u003e `DateTime?`. Create base\n  responses, refactor ExampleApp to tasks, add Funding Source models\n- **2.0.4** Add Webhook Subscription models\n- **2.0.3** Breaking change: CustomerEmbed -\u003e CustomersEmbed. Thanks to @ithielnor for adding\n  Business Classification models and a CLI\n- **1.0.2** Lower VisualStudioVersion, add more properties to Customer\n- **1.0.1** Include deserialized error in DwollaException\n- **1.0.0** 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\n  by [creating a GitHub issue](https://github.com/Dwolla/dwolla-v2-csharp/issues/new).\n- If you would like to contribute to this library,\n  [bug reports](https://github.com/Dwolla/dwolla-v2-csharp/issues) and\n  [pull requests](https://github.com/Dwolla/dwolla-v2-csharp/pulls) are always appreciated!\n\n## Additional Resources\n\nTo learn more about Dwolla and how to integrate our product with your application, please consider\nvisiting 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 Kotlin](https://github.com/Dwolla/dwolla-v2-kotlin)\n  - [Dwolla SDK for Node](https://github.com/Dwolla/dwolla-v2-node)\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/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolla%2Fdwolla-v2-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwolla%2Fdwolla-v2-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolla%2Fdwolla-v2-csharp/lists"}