Moov.Sdk
26.8.5
See the version list below for details.
dotnet add package Moov.Sdk --version 26.8.5
NuGet\Install-Package Moov.Sdk -Version 26.8.5
<PackageReference Include="Moov.Sdk" Version="26.8.5" />
<PackageVersion Include="Moov.Sdk" Version="26.8.5" />
<PackageReference Include="Moov.Sdk" />
paket add Moov.Sdk --version 26.8.5
#r "nuget: Moov.Sdk, 26.8.5"
#:package Moov.Sdk@26.8.5
#addin nuget:?package=Moov.Sdk&version=26.8.5
#tool nuget:?package=Moov.Sdk&version=26.8.5
Moov
SDK Example Usage
Example
using Moov.Sdk;
using Moov.Sdk.Models.Components;
var sdk = new MoovClient(security: new Security() {
Username = "",
Password = "",
});
CreateAccount req = new CreateAccount() {
AccountType = CreateAccountType.Business,
Profile = new CreateProfile() {
Business = new CreateBusinessProfile() {
LegalBusinessName = "Whole Body Fitness LLC",
},
},
};
var res = await sdk.Accounts.CreateAsync(req);
// handle response
Authentication
Per-Client Security Schemes
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
|---|---|---|
Username<br/>Password |
http | HTTP Basic |
You can set the security parameters through the security optional parameter when initializing the SDK client instance. For example:
using Moov.Sdk;
using Moov.Sdk.Models.Components;
var sdk = new MoovClient(security: new Security() {
Username = "",
Password = "",
});
CreateAccount req = new CreateAccount() {
AccountType = CreateAccountType.Business,
Profile = new CreateProfile() {
Business = new CreateBusinessProfile() {
LegalBusinessName = "Whole Body Fitness LLC",
},
},
};
var res = await sdk.Accounts.CreateAsync(req);
// handle response
Per-Operation Security Schemes
Some operations in this SDK require the security scheme to be specified at the request level. For example:
using Moov.Sdk;
using Moov.Sdk.Models.Components;
using Moov.Sdk.Models.Requests;
var sdk = new MoovClient();
var res = await sdk.Avatars.UploadAsync(
security: new UploadAvatarSecurity() {
},
uniqueID: "<id>",
body: new AvatarUploadRequest() {
File = new AvatarUploadRequestFile() {
FileName = "example.file",
Content = System.IO.File.ReadAllBytes("example.file"),
},
}
);
// handle response
Error Handling
MoovException is the base exception class for all HTTP error responses. It has the following properties:
| Property | Type | Description |
|---|---|---|
Message |
string | Error message |
Request |
HttpRequestMessage | HTTP request object |
Response |
HttpResponseMessage | HTTP response object |
Some exceptions in this SDK include an additional Payload field, which will contain deserialized custom error data when present. Possible exceptions are listed in the Error Classes section.
Example
using Moov.Sdk;
using Moov.Sdk.Models.Components;
using Moov.Sdk.Models.Errors;
var sdk = new MoovClient(security: new Security() {
Username = "",
Password = "",
});
try
{
CreateAccount req = new CreateAccount() {
AccountType = CreateAccountType.Business,
Profile = new CreateProfile() {
Business = new CreateBusinessProfile() {
LegalBusinessName = "Whole Body Fitness LLC",
},
},
};
var res = await sdk.Accounts.CreateAsync(req);
// handle response
}
catch (MoovException ex) // all SDK exceptions inherit from MoovException
{
// ex.ToString() provides a detailed error message
System.Console.WriteLine(ex);
// Base exception fields
HttpRequestMessage request = ex.Request;
HttpResponseMessage response = ex.Response;
var statusCode = (int)response.StatusCode;
var responseBody = ex.Body;
if (ex is GenericError) // different exceptions may be thrown depending on the method
{
// Check error data fields
GenericErrorPayload payload = ex.Payload;
string Error = payload.Error;
HTTPMetadata HttpMeta = payload.HttpMeta;
}
// An underlying cause may be provided
if (ex.InnerException != null)
{
Exception cause = ex.InnerException;
}
}
catch (OperationCanceledException ex)
{
// CancellationToken was cancelled
}
catch (System.Net.Http.HttpRequestException ex)
{
// Check ex.InnerException for Network connectivity errors
}
Error Classes
Primary exception:
MoovException: The base class for HTTP error responses.
Less common exceptions (61)
System.Net.Http.HttpRequestException: Network connectivity error. For more details about the underlying cause, inspect theex.InnerException.Inheriting from
MoovException:GenericError: Applicable to 88 of 194 methods.*BrandValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 2 of 194 methods.*ImageRequestValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 2 of 194 methods.*ProductRequestValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 2 of 194 methods.*ScheduleValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 2 of 194 methods.*TransferConfigValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 2 of 194 methods.*TerminalApplicationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 2 of 194 methods.*DuplicateCardError: Attempted to link card that already exists on the account. Status code409. Applicable to 1 of 194 methods.*TransferException: Details of a Transfer. Status code409. Applicable to 1 of 194 methods.*CardAcquiringRefundException: Details of a card refund. Status code409. Applicable to 1 of 194 methods.*CreateAccountError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*PatchAccountError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*ConnectAccountRequestValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*AssignCountriesError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*LinkApplePayError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*BankAccountValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*MicroDepositValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*AddCapabilitiesError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*LinkCardError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*UpdateCardError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*CardMetadataRequestError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*FileUploadValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*FeePlanAgreementError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*FileValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*LinkGooglePayError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*ImageMetadataValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*CreateInvoiceError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*ListInvoicesValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*UpdateInvoiceError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*CreateInvoicePaymentError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*CreatePaymentLinkError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*UpdatePaymentLinkError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*RepresentativeValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*CreateResolutionLinkError: Describes validation errors for the create resolution link request. Status code422. Applicable to 1 of 194 methods.*CreateSweepConfigError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*PatchSweepConfigError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*AccountTerminalApplicationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*CreateTicketError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*UpdateTicketError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*TransferOptionsValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*TransferValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*ListTransfersValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*PatchTransferValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*RefundValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*ReversalValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*UpsertUnderwritingError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*UpdateUnderwritingError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*CreateWalletValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*ListWalletsValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*PatchWalletValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*ListWalletTransactionsValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*CreateWebhookValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*UpdateWebhookValidationError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*RequestCardError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*UpdateIssuedCardError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*RevokeTokenRequestError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*AuthTokenRequestError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*OnboardingInviteError: The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. Status code422. Applicable to 1 of 194 methods.*DepositAccountValidationError: Descriptions of any field validations that failed while parsing the deposit account payload. Status code422. Applicable to 1 of 194 methods.*ResponseValidationError: Thrown when the response data could not be deserialized into the expected type.
* Refer to the relevant documentation to determine whether an exception applies to a specific operation.
Server Selection
Override Server URL Per-Client
The default server can be overridden globally by passing a URL to the serverUrl: string optional parameter when initializing the SDK client instance. For example:
using Moov.Sdk;
using Moov.Sdk.Models.Components;
var sdk = new MoovClient(
serverUrl: "https://api.moov.io",
security: new Security() {
Username = "",
Password = "",
}
);
CreateAccount req = new CreateAccount() {
AccountType = CreateAccountType.Business,
Profile = new CreateProfile() {
Business = new CreateBusinessProfile() {
LegalBusinessName = "Whole Body Fitness LLC",
},
},
};
var res = await sdk.Accounts.CreateAsync(req);
// handle response
Custom HTTP Client
The C# SDK makes API calls using an ISpeakeasyHttpClient that wraps the native
HttpClient. This
client provides the ability to attach hooks around the request lifecycle that can be used to modify the request or handle
errors and response.
The ISpeakeasyHttpClient interface allows you to either use the default SpeakeasyHttpClient that comes with the SDK,
or provide your own custom implementation with customized configuration such as custom message handlers, timeouts,
connection pooling, and other HTTP client settings.
The following example shows how to create a custom HTTP client with request modification and error handling:
using Moov.Sdk;
using Moov.Sdk.Utils;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
// Create a custom HTTP client
public class CustomHttpClient : ISpeakeasyHttpClient
{
private readonly ISpeakeasyHttpClient _defaultClient;
public CustomHttpClient()
{
_defaultClient = new SpeakeasyHttpClient();
}
public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)
{
// Add custom header and timeout
request.Headers.Add("x-custom-header", "custom value");
request.Headers.Add("x-request-timeout", "30");
try
{
var response = await _defaultClient.SendAsync(request, cancellationToken);
// Log successful response
Console.WriteLine($"Request successful: {response.StatusCode}");
return response;
}
catch (Exception error)
{
// Log error
Console.WriteLine($"Request failed: {error.Message}");
throw;
}
}
public void Dispose()
{
_httpClient?.Dispose();
_defaultClient?.Dispose();
}
}
// Use the custom HTTP client with the SDK
var customHttpClient = new CustomHttpClient();
var sdk = new MoovClient(client: customHttpClient);
You can also provide a completely custom HTTP client with your own configuration:
using Moov.Sdk.Utils;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
// Custom HTTP client with custom configuration
public class AdvancedHttpClient : ISpeakeasyHttpClient
{
private readonly HttpClient _httpClient;
public AdvancedHttpClient()
{
var handler = new HttpClientHandler()
{
MaxConnectionsPerServer = 10,
// ServerCertificateCustomValidationCallback = customCertValidation, // Custom SSL validation if needed
};
_httpClient = new HttpClient(handler)
{
Timeout = TimeSpan.FromSeconds(30)
};
}
public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)
{
return await _httpClient.SendAsync(request, cancellationToken ?? CancellationToken.None);
}
public void Dispose()
{
_httpClient?.Dispose();
}
}
var sdk = MoovClient.Builder()
.WithClient(new AdvancedHttpClient())
.Build();
For simple debugging, you can enable request/response logging by implementing a custom client:
public class LoggingHttpClient : ISpeakeasyHttpClient
{
private readonly ISpeakeasyHttpClient _innerClient;
public LoggingHttpClient(ISpeakeasyHttpClient innerClient = null)
{
_innerClient = innerClient ?? new SpeakeasyHttpClient();
}
public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)
{
// Log request
Console.WriteLine($"Sending {request.Method} request to {request.RequestUri}");
var response = await _innerClient.SendAsync(request, cancellationToken);
// Log response
Console.WriteLine($"Received {response.StatusCode} response");
return response;
}
public void Dispose() => _innerClient?.Dispose();
}
var sdk = new MoovClient(client: new LoggingHttpClient());
The SDK also provides built-in hook support through the SDKConfiguration.Hooks system, which automatically handles
BeforeRequestAsync, AfterSuccessAsync, and AfterErrorAsync hooks for advanced request lifecycle management.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- newtonsoft.json (>= 13.0.3)
- nodatime (>= 3.1.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.10.0-dev.8 | 43 | 10/2/2026 |
| 26.10.0-dev.7 | 51 | 9/18/2026 |
| 26.8.5 | 36 | 10/2/2026 |
| 26.8.4 | 187 | 9/18/2026 |
| 26.5.5 | 32 | 10/2/2026 |
| 26.5.4 | 85 | 9/18/2026 |
| 26.3.5 | 34 | 10/2/2026 |
| 26.3.4 | 86 | 9/18/2026 |
| 25.12.5 | 34 | 10/2/2026 |
| 25.12.4 | 83 | 9/18/2026 |
| 25.9.5 | 33 | 10/2/2026 |
| 25.9.4 | 86 | 9/18/2026 |
| 25.6.5 | 34 | 10/2/2026 |
| 25.6.4 | 88 | 9/18/2026 |
| 25.3.5 | 33 | 10/2/2026 |
| 25.3.4 | 85 | 9/18/2026 |
| 24.3.5 | 33 | 10/2/2026 |
| 24.3.4 | 89 | 9/18/2026 |
| 0.0.0-dev.32 | 31 | 10/3/2026 |
| 0.0.0-dev.31 | 52 | 9/19/2026 |