The Basis Theory .NET SDK for .NET Standard 2.0 and .NET Standard 2.1, supporting .Net 5.0 +, .NET Core 2.1 +, and .NET Framework 4.6.2 +.
Using the .NET Core command-line interface (CLI) tools:
dotnet add package BasisTheory.net
Using the NuGet Command Line Interface (CLI):
nuget install BasisTheory.net
Using the Package Manager Console:
Install-Package BasisTheory.net
For a complete list of endpoints and examples, please refer to our API docs
All of the service methods accept an optional RequestOptions
object. This is
used if you want to set a correlation ID or if you want to set a per-request BT-API-KEY
var requestOptions = new RequestOptions();
requestOptions.ApiKey = "API KEY";
requestOptions.CorrelationId = Guid.NewGuid().ToString();
Each client can be configured to use a custom HttpClient
:
var httpClient = new HttpClient();
var client = new TokenClient(apiKey, httpClient: httpClient);
Each client can set a custom API Url, such as calling a deployed instance of the Token Proxy.
var client = new TokenClient(apiKey, apiBaseUrl: "https://token-proxy.somedomain.com");
See complete documentation in the BasisTheory.net.AspNetCore project
The provided scripts with the SDK will check for all dependencies, start docker, build the solution, and run all tests.
Run the following command from the root of the project:
make verify