{"_id":"558206128625220d00429f31","initVersion":{"_id":"555fbba928249c1900618a85","version":"1.0"},"project":"555fbba928249c1900618a82","user":{"_id":"55648cf93b87582b003ab8b1","username":"","name":"Chris Bunting"},"__v":0,"hidden":false,"createdAt":"2015-06-17T23:43:14.495Z","fullscreen":false,"htmlmode":false,"html":"","body":"The [Recurly .NET Client library](https://github.com/recurly/recurly-client-net) is an open source library to interact with Recurly’s subscription management from your .NET application. The library interacts with Recurly’s v2 API.\n\nView the [GitHub project site](https://github.com/recurly/recurly-client-net) for a list of requirements and download/install instructions.\n\n* [Configuration](#configuration)\n* [Using the API](#using-the-api)\n* [Handling Errors](#handling-errors)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuration\"\n}\n[/block]\nSpecify your [API Key, site subdomain, private key](https://app.recurly.com/go/developer/api_access), and (optionally) page size setting in your `app.config` or `web.config` file:\n\n```\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n  <configSections>\n    <section name=\"recurly\" type=\"Recurly.Configuration.Section,Recurly\"/>\n  </configSections>\n\n  <recurly\n    apiKey=\"123456789012345678901234567890ab\"\n    subdomain=\"company\"\n\tpageSize=\"50\" /> <!-- optional. 50 is the default -->\n\n</configuration>\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using the API\"\n}\n[/block]\nEach endpoint is documented with examples [here](https://dev.recurly.com/docs/getting-started). Feel free to explore them for more information related to specific endpoints.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Handling Errors\"\n}\n[/block]\nAny request which results in an HTTP 404 returned from the API will throw a `Recurly.NotFoundException`. For example:\n\n```\ntry\n{\n    var account = Accounts.Get(\"1\");\n    Console.WriteLine(\"Account \" + account);\n}\ncatch (NotFoundException e)\n{\n    Console.WriteLine(\"Account not found.\");\n}\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Support\"\n}\n[/block]\nLooking for help? Please contact <support@recurly.com> or visit [support.recurly.com](https://support.recurly.com/).\n[Stackoverflow](http://stackoverflow.com/questions/tagged/recurly) is also a great place to talk to the community and find answers to common questions.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Announcements\"\n}\n[/block]\nFor the latest API and client library announcements follow Recurly on Twitter and join our Google Group:\n\n- [@recurly](https://twitter.com/recurly)\n- [Recurly Google Group](http://groups.google.com/group/recurly-api)","slug":"net","title":".NET"}

.NET


The [Recurly .NET Client library](https://github.com/recurly/recurly-client-net) is an open source library to interact with Recurly’s subscription management from your .NET application. The library interacts with Recurly’s v2 API. View the [GitHub project site](https://github.com/recurly/recurly-client-net) for a list of requirements and download/install instructions. * [Configuration](#configuration) * [Using the API](#using-the-api) * [Handling Errors](#handling-errors) [block:api-header] { "type": "basic", "title": "Configuration" } [/block] Specify your [API Key, site subdomain, private key](https://app.recurly.com/go/developer/api_access), and (optionally) page size setting in your `app.config` or `web.config` file: ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="recurly" type="Recurly.Configuration.Section,Recurly"/> </configSections> <recurly apiKey="123456789012345678901234567890ab" subdomain="company" pageSize="50" /> <!-- optional. 50 is the default --> </configuration> ``` [block:api-header] { "type": "basic", "title": "Using the API" } [/block] Each endpoint is documented with examples [here](https://dev.recurly.com/docs/getting-started). Feel free to explore them for more information related to specific endpoints. [block:api-header] { "type": "basic", "title": "Handling Errors" } [/block] Any request which results in an HTTP 404 returned from the API will throw a `Recurly.NotFoundException`. For example: ``` try { var account = Accounts.Get("1"); Console.WriteLine("Account " + account); } catch (NotFoundException e) { Console.WriteLine("Account not found."); } ``` [block:api-header] { "type": "basic", "title": "Support" } [/block] Looking for help? Please contact <support@recurly.com> or visit [support.recurly.com](https://support.recurly.com/). [Stackoverflow](http://stackoverflow.com/questions/tagged/recurly) is also a great place to talk to the community and find answers to common questions. [block:api-header] { "type": "basic", "title": "Announcements" } [/block] For the latest API and client library announcements follow Recurly on Twitter and join our Google Group: - [@recurly](https://twitter.com/recurly) - [Recurly Google Group](http://groups.google.com/group/recurly-api)