Banking.NET
1.0.0
dotnet add package Banking.NET --version 1.0.0
NuGet\Install-Package Banking.NET -Version 1.0.0
<PackageReference Include="Banking.NET" Version="1.0.0" />
<PackageVersion Include="Banking.NET" Version="1.0.0" />
<PackageReference Include="Banking.NET" />
paket add Banking.NET --version 1.0.0
#r "nuget: Banking.NET, 1.0.0"
#:package Banking.NET@1.0.0
#addin nuget:?package=Banking.NET&version=1.0.0
#tool nuget:?package=Banking.NET&version=1.0.0
Banking.NET
Banking.NET is a provider-neutral home for .NET banking API client libraries. The Commerzbank Corporate Payments API is the first (currently only) provider, available under the Banking.NET.Commerzbank namespace: OAuth client credentials, mutual TLS, EBICS order types, fragmented downloads and ISO 20022 (camt, pain) readers and writers. Unofficial, not affiliated with Commerzbank AG.
Quick Start
dotnet add package Banking.NET
Register the client in your DI container:
builder.Services.AddCommerzbank(options =>
{
options.ClientId = "your-client-id";
options.ClientSecret = "your-client-secret";
options.Environment = CommerzbankEnvironment.Sandbox;
}).AddCorporatePayments();
Or bind from configuration:
builder.Services
.AddCommerzbank(builder.Configuration.GetSection(CommerzbankOptions.SectionName))
.AddCorporatePayments();
Inject and fetch waiting messages:
public sealed class StatementService(ICorporatePaymentsClient client)
{
public async Task PrintWaitingMessagesAsync()
{
await foreach (var message in client.FetchMessagesAsync())
Console.WriteLine($"{message.MessageId}: {message.OrderType} ({message.Content.Length} bytes)");
}
}
Features
- OAuth 2.0 client credentials with automatic refresh-token reuse and re-authentication
- Mutual TLS client certificates (PKCS#12 or PEM) for production
OrderTypecovers every documented EBICS order code, with room for customer-specific codes- Transparent multi-fragment downloads, including streaming straight to a destination
Stream - gzip-aware submission, heartbeat, and at-least-once message confirmation (
FetchMessagesAsync) - ISO 20022 readers for camt.052/053/054 and pain.002
- ISO 20022 writers for pain.001 and pain.008, current and legacy schema versions
- Typed exception hierarchy carrying HTTP status,
X-CorrelationIDand the raw response body
ISO 20022 Example
var message = await client.DownloadMessageAsync(messageId);
var bankToCustomerMessage = CamtReader.Read(message);
foreach (var statement in bankToCustomerMessage.Statements)
Console.WriteLine($"{statement.Account?.Iban}: {statement.Balances.Count} balance(s), {statement.Entries.Count} entry/entries");
Error Handling
try
{
var message = await client.DownloadMessageAsync(messageId);
}
catch (CommerzbankNotFoundException) { /* 404 */ }
catch (CommerzbankGoneException) { /* 410 */ }
catch (CommerzbankAuthenticationException) { /* token/401/400 with challenge */ }
catch (CommerzbankApiException ex) { /* other API errors, ex.CorrelationId */ }
Documentation
For full documentation, guides, and offline ISO 20022 tools, visit the project site. For an interactive walkthrough against the sandbox, run the Banking.NET.Samples.Console sample from the repository.
Source code and issue tracker: GitHub
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.Http (>= 10.0.11)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.11)
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 |
|---|---|---|
| 1.0.0 | 143 | 9/4/2026 |