Banking.NET 1.0.0

dotnet add package Banking.NET --version 1.0.0
                    
NuGet\Install-Package Banking.NET -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Banking.NET" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Banking.NET" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Banking.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Banking.NET --version 1.0.0
                    
#r "nuget: Banking.NET, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Banking.NET@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Banking.NET&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Banking.NET&version=1.0.0
                    
Install as a Cake Tool

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
  • OrderType covers 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-CorrelationID and 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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