From 6a1f311eacdc073eb3646865d9ae74d3a7b69ddd Mon Sep 17 00:00:00 2001 From: Cozmin Ungureanu Date: Thu, 19 Mar 2026 21:58:04 +0200 Subject: [PATCH 1/7] first draft --- .../blog/2026-03-19-open-payments-dotnet.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 src/content/blog/2026-03-19-open-payments-dotnet.md diff --git a/src/content/blog/2026-03-19-open-payments-dotnet.md b/src/content/blog/2026-03-19-open-payments-dotnet.md new file mode 100644 index 00000000..a9ee9571 --- /dev/null +++ b/src/content/blog/2026-03-19-open-payments-dotnet.md @@ -0,0 +1,145 @@ +--- +title: 'dotnet add package Interledger.OpenPayments' +description: 'The missing link between your C# backend and the future of interoperable digital finance.' +date: 2026-03-19 +slug: open-payments-dotnet-sdk +authors: + - Cozmin Ungureanu +author_urls: + - https://github.com/cozminu +tags: + - Releases + - Open Payments + - Updates +--- + +We're excited to announce the release of the [**Open Payments .NET SDK**](https://github.com/interledger/open-payments-dotnet), a fully typed, idiomatic C# client for the [Open Payments](https://openpayments.dev/) API standard. If you're building payment experiences in .NET, this SDK gives you everything you need to integrate interoperable payments into your backend. + +## What is Open Payments? + +[Open Payments](https://openpayments.dev/) is an open API standard that enables interoperable digital payments across banks, digital wallets, and mobile money providers. It covers eCommerce checkout, peer-to-peer transfers, subscriptions, Web Monetization, and more - all through a unified set of APIs for account discovery, payment management, and [GNAP](https://datatracker.ietf.org/doc/html/draft-ietf-gnap-core-protocol)-based authorization. Until now, .NET developers had to wire all of this up manually. Not anymore. + +## Why a .NET SDK? + +The .NET ecosystem powers a significant share of enterprise backends, fintech platforms, and payment processors worldwide. With this SDK, the same developers who build these systems can now integrate Open Payments natively with the type safety, dependency injection support and async patterns they already know and love. + +The SDK is generated from the [official Open Payments OpenAPI specifications](https://github.com/interledger/open-payments), then augmented with hand-crafted client interfaces, GNAP authentication, and automatic [HTTP Message Signatures](https://www.rfc-editor.org/rfc/rfc9421) (Ed25519). You get a clean, high-level API without sacrificing spec compliance. + +## Getting Started + +Install the NuGet package in your project: + +```bash +dotnet add package Interledger.OpenPayments +``` + +Then set up the client in a few lines: + +```csharp +using Microsoft.Extensions.DependencyInjection; +using OpenPayments.Sdk.Clients; +using OpenPayments.Sdk.Extensions; +using OpenPayments.Sdk.HttpSignatureUtils; + +var client = new ServiceCollection() + .UseOpenPayments(opts => + { + opts.UseAuthenticatedClient = true; + opts.KeyId = "your-key-id"; + opts.PrivateKey = KeyUtils.LoadPem(yourPrivateKeyPem); + opts.ClientUrl = new Uri("https://wallet.example.com/your-account"); + }) + .BuildServiceProvider() + .GetRequiredService(); +``` + +The SDK plugs directly into `Microsoft.Extensions.DependencyInjection`, so it fits naturally into ASP.NET Core applications, background workers, or any DI-enabled host. + +## What Can You Do With It? + +The SDK covers the full Open Payments API surface: + +**Wallet Addresses** - look up any Open Payments-enabled account: + +```csharp +var walletAddress = await client.GetWalletAddressAsync( + "https://wallet.example.com/alice" +); +// walletAddress.AuthServer, walletAddress.ResourceServer +``` + +**Incoming Payments** - create, retrieve, list, and complete incoming payment resources: + +```csharp +var incomingPayment = await client.CreateIncomingPaymentAsync( + new AuthRequestArgs { Url = walletAddress.ResourceServer, AccessToken = token }, + new IncomingPaymentBody + { + WalletAddress = walletAddress.Id, + IncomingAmount = new Amount("10000", "USD", 2) // $100.00 + } +); +``` + +**Quotes** - get exchange rates and fees before committing to a payment: + +```csharp +var quote = await client.CreateQuoteAsync( + new AuthRequestArgs { Url = senderWallet.ResourceServer, AccessToken = token }, + new QuoteBody + { + WalletAddress = senderWallet.Id, + Receiver = receiverWallet.Id, + Method = PaymentMethod.Ilp + } +); +// quote.DebitAmount, quote.ReceiveAmount, quote.ExpiresAt +``` + +**Outgoing Payments** - execute payments based on quotes or direct to incoming payments: + +```csharp +var payment = await client.CreateOutgoingPaymentAsync( + new AuthRequestArgs { Url = senderWallet.ResourceServer, AccessToken = token }, + new OutgoingPaymentBodyFromQuote + { + WalletAddress = senderWallet.Id, + QuoteId = quote.Id + } +); +``` + +**Grants and Tokens** - full GNAP authorization flow, including interactive grants with user consent, token rotation, and revocation. + +## Security Built In + +Every authenticated request is automatically signed using Ed25519 HTTP Message Signatures ([RFC 9421](https://www.rfc-editor.org/rfc/rfc9421)). The SDK handles this transparently - you never have to manually construct signature headers, compute content digests, or manage signing parameters. Just provide your private key at setup and make your API calls. + +The `Interledger.OpenPayments.HttpSignatureUtils` package is also available separately if you need HTTP signature functionality in other contexts. + +## Real-World Payment Scenarios + +The SDK ships with eight annotated guides covering end-to-end payment flows: + +1. **One-time e-commerce payment** - retailer checkout with quote and interactive grant +2. **Fixed-debit remittance** - send fixed amount from your account +3. **Fixed-receive remittance** - ensure the recipient gets an exact amount +4. **Recurring payment setup** - monthly subscriptions with ISO 8601 intervals +5. **Recurring fixed-debit** payments +6. **Recurring fixed-receive** payments +7. **Split payments** - divide a payment between multiple recipients +8. **Pre-authorized future payments** - grant access for a service to initiate payments later + +Each guide walks through the full payment lifecycle. You can find the full guides and documentation at [openpayments.dev](https://openpayments.dev/). + +## What's Next + +This is just the beginning. We're actively working on improving the SDK and would love your feedback. Here's how to get involved: + +- **Try it out**: `dotnet add package Interledger.OpenPayments` +- **Browse the source**: [github.com/interledger/open-payments-dotnet](https://github.com/interledger/open-payments-dotnet) +- **Read the docs**: [openpayments.dev](https://openpayments.dev/) +- **Join the conversation**: Our community catchup calls happen every other Wednesday at 13:00 GMT. [Join via Google Meet](https://meet.google.com/htd-eefo-ovn) +- **Contribute**: Check the [contribution guidelines](https://github.com/interledger/open-payments-dotnet/blob/main/.github/contributing.md) and jump in + +If you run into issues or have feature requests, [open an issue](https://github.com/interledger/open-payments-dotnet/issues) on GitHub. We're building this for the community and your input matters. From 69bac2fa8f729e98e6925a9a306d1cdfba8ab172 Mon Sep 17 00:00:00 2001 From: Cozmin Ungureanu Date: Fri, 27 Mar 2026 15:30:10 +0200 Subject: [PATCH 2/7] Add OP .NET SDK blog post --- .../blog/2026-03-19-open-payments-dotnet.md | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/content/blog/2026-03-19-open-payments-dotnet.md b/src/content/blog/2026-03-19-open-payments-dotnet.md index a9ee9571..42b634e3 100644 --- a/src/content/blog/2026-03-19-open-payments-dotnet.md +++ b/src/content/blog/2026-03-19-open-payments-dotnet.md @@ -1,6 +1,6 @@ --- -title: 'dotnet add package Interledger.OpenPayments' -description: 'The missing link between your C# backend and the future of interoperable digital finance.' +title: 'Open Payments meet .NET' +description: 'Integrate Open Payments into your stack with native DI, full type safety and automatic GNAP signatures.' date: 2026-03-19 slug: open-payments-dotnet-sdk authors: @@ -13,11 +13,11 @@ tags: - Updates --- -We're excited to announce the release of the [**Open Payments .NET SDK**](https://github.com/interledger/open-payments-dotnet), a fully typed, idiomatic C# client for the [Open Payments](https://openpayments.dev/) API standard. If you're building payment experiences in .NET, this SDK gives you everything you need to integrate interoperable payments into your backend. +Building payment experiences in C# just got a lot simpler. We’ve officially launched the [Open Payments .NET SDK](https://github.com/interledger/open-payments-dotnet), removing the friction of manual API wiring. It’s a production-ready, type-safe gateway that gives .NET developers everything they need to integrate secure, interoperable finance into their applications. ## What is Open Payments? -[Open Payments](https://openpayments.dev/) is an open API standard that enables interoperable digital payments across banks, digital wallets, and mobile money providers. It covers eCommerce checkout, peer-to-peer transfers, subscriptions, Web Monetization, and more - all through a unified set of APIs for account discovery, payment management, and [GNAP](https://datatracker.ietf.org/doc/html/draft-ietf-gnap-core-protocol)-based authorization. Until now, .NET developers had to wire all of this up manually. Not anymore. +[Open Payments](https://openpayments.dev/) is an API standard for banks, mobile money providers, and other account servicing entities. It allows developers to build payment capabilities into their apps without the need for custom integrations or third-party payment processors. ## Why a .NET SDK? @@ -117,6 +117,31 @@ Every authenticated request is automatically signed using Ed25519 HTTP Message S The `Interledger.OpenPayments.HttpSignatureUtils` package is also available separately if you need HTTP signature functionality in other contexts. +## Error Handling + +The SDK provides structured error handling through typed exceptions. API errors are surfaced as `ApiException`, giving you access to the HTTP status code, the raw response and a deserialized error model: + +```csharp +try +{ + var payment = await client.CreateOutgoingPaymentAsync(requestArgs, body); +} +catch (ApiException ex) +{ + // Typed error with structured details + Console.WriteLine($"Error: {ex.Result.Error.Code}"); // e.g. "invalid_request" + Console.WriteLine($"Description: {ex.Result.Error.Description}"); + Console.WriteLine($"HTTP Status: {ex.StatusCode}"); // e.g. 400, 403 +} +catch (ApiException ex) +{ + // Unexpected error — no typed body + Console.WriteLine($"Unexpected error ({ex.StatusCode}): {ex.Response}"); +} +``` + +Auth server errors include specific GNAP error codes like `invalid_client`, `request_denied`, and `too_fast` (rate limiting), so you can handle each scenario appropriately. + ## Real-World Payment Scenarios The SDK ships with eight annotated guides covering end-to-end payment flows: From aabd7c54681ea09bedbfeb128368137b001458ce Mon Sep 17 00:00:00 2001 From: Cozmin Ungureanu Date: Fri, 27 Mar 2026 15:34:05 +0200 Subject: [PATCH 3/7] update date for blog post --- ...en-payments-dotnet.md => 2026-03-31-open-payments-dotnet.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/content/blog/{2026-03-19-open-payments-dotnet.md => 2026-03-31-open-payments-dotnet.md} (99%) diff --git a/src/content/blog/2026-03-19-open-payments-dotnet.md b/src/content/blog/2026-03-31-open-payments-dotnet.md similarity index 99% rename from src/content/blog/2026-03-19-open-payments-dotnet.md rename to src/content/blog/2026-03-31-open-payments-dotnet.md index 42b634e3..cd60d767 100644 --- a/src/content/blog/2026-03-19-open-payments-dotnet.md +++ b/src/content/blog/2026-03-31-open-payments-dotnet.md @@ -1,7 +1,7 @@ --- title: 'Open Payments meet .NET' description: 'Integrate Open Payments into your stack with native DI, full type safety and automatic GNAP signatures.' -date: 2026-03-19 +date: 2026-03-31 slug: open-payments-dotnet-sdk authors: - Cozmin Ungureanu From 49c9fe1b9f53decb07ff27a8ef86f5ce8decafa6 Mon Sep 17 00:00:00 2001 From: Cozmin Ungureanu Date: Fri, 27 Mar 2026 16:04:41 +0200 Subject: [PATCH 4/7] touchup blog post --- src/content/blog/2026-03-31-open-payments-dotnet.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content/blog/2026-03-31-open-payments-dotnet.md b/src/content/blog/2026-03-31-open-payments-dotnet.md index cd60d767..c11c637b 100644 --- a/src/content/blog/2026-03-31-open-payments-dotnet.md +++ b/src/content/blog/2026-03-31-open-payments-dotnet.md @@ -13,7 +13,7 @@ tags: - Updates --- -Building payment experiences in C# just got a lot simpler. We’ve officially launched the [Open Payments .NET SDK](https://github.com/interledger/open-payments-dotnet), removing the friction of manual API wiring. It’s a production-ready, type-safe gateway that gives .NET developers everything they need to integrate secure, interoperable finance into their applications. +Building payment experiences in C# just got simpler. We’ve officially launched the [Open Payments .NET SDK](https://github.com/interledger/open-payments-dotnet), removing the friction of manual API wiring. It’s a production-ready library that gives .NET developers everything they need to integrate secure, interoperable finance into their applications. ## What is Open Payments? @@ -21,7 +21,7 @@ Building payment experiences in C# just got a lot simpler. We’ve officially la ## Why a .NET SDK? -The .NET ecosystem powers a significant share of enterprise backends, fintech platforms, and payment processors worldwide. With this SDK, the same developers who build these systems can now integrate Open Payments natively with the type safety, dependency injection support and async patterns they already know and love. +The .NET ecosystem powers a significant share of enterprise backends, fintech platforms and payment processors worldwide. With this SDK, the same developers who build these systems can now integrate Open Payments natively with the type safety, dependency injection support and async patterns they already know and love. The SDK is generated from the [official Open Payments OpenAPI specifications](https://github.com/interledger/open-payments), then augmented with hand-crafted client interfaces, GNAP authentication, and automatic [HTTP Message Signatures](https://www.rfc-editor.org/rfc/rfc9421) (Ed25519). You get a clean, high-level API without sacrificing spec compliance. @@ -111,6 +111,8 @@ var payment = await client.CreateOutgoingPaymentAsync( **Grants and Tokens** - full GNAP authorization flow, including interactive grants with user consent, token rotation, and revocation. +Check out [openpayments.dev](https://openpayments.dev/) for complete examples and guides. + ## Security Built In Every authenticated request is automatically signed using Ed25519 HTTP Message Signatures ([RFC 9421](https://www.rfc-editor.org/rfc/rfc9421)). The SDK handles this transparently - you never have to manually construct signature headers, compute content digests, or manage signing parameters. Just provide your private key at setup and make your API calls. From 8bb55c2e05ecd6bc96b245e116f43ec14bbfa4d8 Mon Sep 17 00:00:00 2001 From: Cozmin Ungureanu Date: Thu, 23 Apr 2026 12:36:01 +0300 Subject: [PATCH 5/7] rename blog post --- ...en-payments-dotnet.md => 2026-04-23-open-payments-dotnet.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/content/blog/{2026-03-31-open-payments-dotnet.md => 2026-04-23-open-payments-dotnet.md} (99%) diff --git a/src/content/blog/2026-03-31-open-payments-dotnet.md b/src/content/blog/2026-04-23-open-payments-dotnet.md similarity index 99% rename from src/content/blog/2026-03-31-open-payments-dotnet.md rename to src/content/blog/2026-04-23-open-payments-dotnet.md index c11c637b..ba47a05c 100644 --- a/src/content/blog/2026-03-31-open-payments-dotnet.md +++ b/src/content/blog/2026-04-23-open-payments-dotnet.md @@ -1,7 +1,7 @@ --- title: 'Open Payments meet .NET' description: 'Integrate Open Payments into your stack with native DI, full type safety and automatic GNAP signatures.' -date: 2026-03-31 +date: 2026-04-23 slug: open-payments-dotnet-sdk authors: - Cozmin Ungureanu From a955547086fee7e426b3f14a8822d0e036e1fb0d Mon Sep 17 00:00:00 2001 From: Cozmin Date: Thu, 23 Apr 2026 14:10:17 +0300 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Max Kurapov --- src/content/blog/2026-04-23-open-payments-dotnet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/blog/2026-04-23-open-payments-dotnet.md b/src/content/blog/2026-04-23-open-payments-dotnet.md index ba47a05c..5e26bc9d 100644 --- a/src/content/blog/2026-04-23-open-payments-dotnet.md +++ b/src/content/blog/2026-04-23-open-payments-dotnet.md @@ -1,6 +1,6 @@ --- title: 'Open Payments meet .NET' -description: 'Integrate Open Payments into your stack with native DI, full type safety and automatic GNAP signatures.' +description: 'Integrate Open Payments into your stack with native DI, full type safety and automatic request signing.' date: 2026-04-23 slug: open-payments-dotnet-sdk authors: From 66463675fde116bae4697f6d6142f29ec0939582 Mon Sep 17 00:00:00 2001 From: Cozmin Ungureanu Date: Thu, 23 Apr 2026 14:20:36 +0300 Subject: [PATCH 7/7] Change requests --- src/content/blog/2026-04-23-open-payments-dotnet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/blog/2026-04-23-open-payments-dotnet.md b/src/content/blog/2026-04-23-open-payments-dotnet.md index ba47a05c..e5348f51 100644 --- a/src/content/blog/2026-04-23-open-payments-dotnet.md +++ b/src/content/blog/2026-04-23-open-payments-dotnet.md @@ -146,7 +146,7 @@ Auth server errors include specific GNAP error codes like `invalid_client`, `req ## Real-World Payment Scenarios -The SDK ships with eight annotated guides covering end-to-end payment flows: +We have updated the eight guides on [openpayments.dev](https://openpayments.dev/) to include detailed dotnet client usage & examples: 1. **One-time e-commerce payment** - retailer checkout with quote and interactive grant 2. **Fixed-debit remittance** - send fixed amount from your account @@ -166,7 +166,7 @@ This is just the beginning. We're actively working on improving the SDK and woul - **Try it out**: `dotnet add package Interledger.OpenPayments` - **Browse the source**: [github.com/interledger/open-payments-dotnet](https://github.com/interledger/open-payments-dotnet) - **Read the docs**: [openpayments.dev](https://openpayments.dev/) -- **Join the conversation**: Our community catchup calls happen every other Wednesday at 13:00 GMT. [Join via Google Meet](https://meet.google.com/htd-eefo-ovn) +- **Join the conversation**: Our community catchup calls happen every other Thursday at 12:00 UTC. [Join via Google Meet](https://meet.google.com/htd-eefo-ovn) - **Contribute**: Check the [contribution guidelines](https://github.com/interledger/open-payments-dotnet/blob/main/.github/contributing.md) and jump in If you run into issues or have feature requests, [open an issue](https://github.com/interledger/open-payments-dotnet/issues) on GitHub. We're building this for the community and your input matters.