- Sign-in to Basis Theory and go to Applications
- Create a Basis Theory Private Application
- All permissions should be selected
- Paste the API Key into the
BT-API-KEY
variable
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: v1
- SDK version: 1.0.0
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen
- .NET Core >=1.0
- .NET Framework >=4.6
- Mono/Xamarin >=vNext
- RestSharp - 106.13.0 or later
- Json.NET - 13.0.1 or later
- JsonSubTypes - 1.8.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.
Generate the DLL using your preferred tool (e.g. dotnet build
)
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
To use the API client with a HTTP proxy, setup a System.Net.WebProxy
Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;
using System.Collections.Generic;
using System.Diagnostics;
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
// Configure API key authorization: ApiKey
config.ApiKey.Add("BT-API-KEY", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.ApiKeyPrefix.Add("BT-API-KEY", "Bearer");
var apiInstance = new ApplicationKeysApi(config);
var id = "id_example"; // Guid |
try
{
ApplicationKey result = apiInstance.Create(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ApplicationKeysApi.Create: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to https://api.basistheory.com
Class | Method | HTTP request | Description |
---|---|---|---|
ApplicationKeysApi | Create | POST /applications/{id}/keys | |
ApplicationKeysApi | Delete | DELETE /applications/{id}/keys/{keyId} | |
ApplicationKeysApi | Get | GET /applications/{id}/keys | |
ApplicationKeysApi | GetById | GET /applications/{id}/keys/{keyId} | |
ApplicationTemplatesApi | Get | GET /application-templates | |
ApplicationTemplatesApi | GetById | GET /application-templates/{id} | |
ApplicationsApi | Create | POST /applications | |
ApplicationsApi | Delete | DELETE /applications/{id} | |
ApplicationsApi | Get | GET /applications | |
ApplicationsApi | GetById | GET /applications/{id} | |
ApplicationsApi | GetByKey | GET /applications/key | |
ApplicationsApi | RegenerateKey | POST /applications/{id}/regenerate | |
ApplicationsApi | Update | PUT /applications/{id} | |
DetokenizeApi | Detokenize | POST /detokenize | |
EnrichmentsApi | BankAccountVerify | POST /enrichments/bank-account-verify | |
LogsApi | Get | GET /logs | |
LogsApi | GetEntityTypes | GET /logs/entity-types | |
PermissionsApi | Get | GET /permissions | |
ProxiesApi | Create | POST /proxies | |
ProxiesApi | Delete | DELETE /proxies/{id} | |
ProxiesApi | Get | GET /proxies | |
ProxiesApi | GetById | GET /proxies/{id} | |
ProxiesApi | Patch | PATCH /proxies/{id} | |
ProxiesApi | Update | PUT /proxies/{id} | |
ReactorFormulasApi | Create | POST /reactor-formulas | |
ReactorFormulasApi | Delete | DELETE /reactor-formulas/{id} | |
ReactorFormulasApi | Get | GET /reactor-formulas | |
ReactorFormulasApi | GetById | GET /reactor-formulas/{id} | |
ReactorFormulasApi | Update | PUT /reactor-formulas/{id} | |
ReactorsApi | Create | POST /reactors | |
ReactorsApi | Delete | DELETE /reactors/{id} | |
ReactorsApi | Get | GET /reactors | |
ReactorsApi | GetById | GET /reactors/{id} | |
ReactorsApi | Patch | PATCH /reactors/{id} | |
ReactorsApi | React | POST /reactors/{id}/react | |
ReactorsApi | ReactAsync | POST /reactors/{id}/react-async | |
ReactorsApi | ResultGetById | GET /reactors/{id}/results/{requestId} | |
ReactorsApi | Update | PUT /reactors/{id} | |
RolesApi | Get | GET /roles | |
SessionsApi | Authorize | POST /sessions/authorize | |
SessionsApi | Create | POST /sessions | |
TenantsApi | CreateConnection | POST /tenants/self/connections | |
TenantsApi | CreateInvitation | POST /tenants/self/invitations | |
TenantsApi | Delete | DELETE /tenants/self | |
TenantsApi | DeleteConnection | DELETE /tenants/self/connections | |
TenantsApi | DeleteInvitation | DELETE /tenants/self/invitations/{invitationId} | |
TenantsApi | DeleteMember | DELETE /tenants/self/members/{memberId} | |
TenantsApi | Get | GET /tenants/self | |
TenantsApi | GetInvitations | GET /tenants/self/invitations | |
TenantsApi | GetMembers | GET /tenants/self/members | |
TenantsApi | GetTenantUsageReport | GET /tenants/self/reports/usage | |
TenantsApi | OwnerGet | GET /tenants/self/owner | |
TenantsApi | ResendInvitation | POST /tenants/self/invitations/{invitationId}/resend | |
TenantsApi | Update | PUT /tenants/self | |
TenantsApi | UpdateMember | PUT /tenants/self/members/{memberId} | |
ThreeDSApi | ThreeDSAuthenticateSession | POST /3ds/sessions/{sessionId}/authenticate | |
ThreeDSApi | ThreeDSCreateSession | POST /3ds/sessions | |
ThreeDSApi | ThreeDSGetChallengeResult | GET /3ds/sessions/{sessionId}/challenge-result | |
ThreeDSApi | ThreeDSGetSessionById | GET /3ds/sessions/{id} | |
TokenizeApi | Tokenize | POST /tokenize | |
TokensApi | Create | POST /tokens | |
TokensApi | Delete | DELETE /tokens/{id} | |
TokensApi | Get | GET /tokens | |
TokensApi | GetById | GET /tokens/{id} | |
TokensApi | GetV2 | GET /v2/tokens | |
TokensApi | Search | POST /tokens/search | |
TokensApi | SearchV2 | POST /v2/tokens/search | |
TokensApi | Update | PATCH /tokens/{id} |
- Model.AccessRule
- Model.Application
- Model.ApplicationKey
- Model.ApplicationPaginatedList
- Model.ApplicationTemplate
- Model.AuthenticateThreeDSSessionRequest
- Model.AuthorizeSessionRequest
- Model.BankVerificationRequest
- Model.BinDetails
- Model.BinDetailsBank
- Model.BinDetailsCountry
- Model.BinDetailsProduct
- Model.CardDetails
- Model.Condition
- Model.CreateApplicationRequest
- Model.CreateProxyRequest
- Model.CreateReactorFormulaRequest
- Model.CreateReactorRequest
- Model.CreateSessionResponse
- Model.CreateTenantConnectionRequest
- Model.CreateTenantConnectionResponse
- Model.CreateTenantInvitationRequest
- Model.CreateThreeDSSessionRequest
- Model.CreateThreeDSSessionResponse
- Model.CreateTokenRequest
- Model.CursorPagination
- Model.GetApplications
- Model.GetLogs
- Model.GetPermissions
- Model.GetProxies
- Model.GetReactorFormulas
- Model.GetReactors
- Model.GetTenantInvitations
- Model.GetTenantMembers
- Model.GetTokens
- Model.GetTokensV2
- Model.Log
- Model.LogEntityType
- Model.LogPaginatedList
- Model.Pagination
- Model.PatchProxyRequest
- Model.PatchReactorRequest
- Model.Permission
- Model.Privacy
- Model.ProblemDetails
- Model.Proxy
- Model.ProxyPaginatedList
- Model.ProxyTransform
- Model.ReactRequest
- Model.ReactRequestAsync
- Model.ReactResponse
- Model.Reactor
- Model.ReactorFormula
- Model.ReactorFormulaConfiguration
- Model.ReactorFormulaPaginatedList
- Model.ReactorFormulaRequestParameter
- Model.ReactorPaginatedList
- Model.Role
- Model.SearchTokensRequest
- Model.SearchTokensRequestV2
- Model.StringStringKeyValuePair
- Model.Tenant
- Model.TenantConnectionOptions
- Model.TenantInvitationResponse
- Model.TenantInvitationResponsePaginatedList
- Model.TenantInvitationStatus
- Model.TenantMemberResponse
- Model.TenantMemberResponsePaginatedList
- Model.TenantUsageReport
- Model.ThreeDSAcsRenderingType
- Model.ThreeDSAddress
- Model.ThreeDSAuthentication
- Model.ThreeDSCardholderAccountInfo
- Model.ThreeDSCardholderAuthenticationInfo
- Model.ThreeDSCardholderInfo
- Model.ThreeDSCardholderPhoneNumber
- Model.ThreeDSDeviceInfo
- Model.ThreeDSMerchantInfo
- Model.ThreeDSMerchantRiskInfo
- Model.ThreeDSMessageExtension
- Model.ThreeDSMethod
- Model.ThreeDSMobileSdkRenderOptions
- Model.ThreeDSPriorAuthenticationInfo
- Model.ThreeDSPurchaseInfo
- Model.ThreeDSRequestorInfo
- Model.ThreeDSSession
- Model.ThreeDSVersion
- Model.Token
- Model.TokenCursorPaginatedList
- Model.TokenEnrichments
- Model.TokenExtras
- Model.TokenMetrics
- Model.TokenPaginatedList
- Model.TokenReport
- Model.UpdateApplicationRequest
- Model.UpdatePrivacy
- Model.UpdateProxyRequest
- Model.UpdateReactorFormulaRequest
- Model.UpdateReactorRequest
- Model.UpdateTenantMemberRequest
- Model.UpdateTenantRequest
- Model.UpdateTokenRequest
- Model.User
- Model.ValidationProblemDetails
- Type: API key
- API key parameter name: BT-API-KEY
- Location: HTTP header