OpenReceive.AspNetCore 0.6.6

dotnet add package OpenReceive.AspNetCore --version 0.6.6
                    
NuGet\Install-Package OpenReceive.AspNetCore -Version 0.6.6
                    
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="OpenReceive.AspNetCore" Version="0.6.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenReceive.AspNetCore" Version="0.6.6" />
                    
Directory.Packages.props
<PackageReference Include="OpenReceive.AspNetCore" />
                    
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 OpenReceive.AspNetCore --version 0.6.6
                    
#r "nuget: OpenReceive.AspNetCore, 0.6.6"
                    
#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 OpenReceive.AspNetCore@0.6.6
                    
#: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=OpenReceive.AspNetCore&version=0.6.6
                    
Install as a Cake Addin
#tool nuget:?package=OpenReceive.AspNetCore&version=0.6.6
                    
Install as a Cake Tool

OpenReceive.AspNetCore

Accept Bitcoin over Lightning in an ASP.NET Core app, paid straight into your own wallet. You connect the wallet with a receive-only Nostr Wallet Connect (NWC) code, and this package mounts the checkout routes in your app: it mints invoices, finds settlement, and calls your code once when an order is paid. There is no OpenReceive account, and OpenReceive never holds the funds.

OpenReceive also supports optional swaps from USDT, USDC, SOL, and ETH through a configured swap provider. The provider converts the payment to BTC over Lightning, which settles into the merchant's connected wallet. Available assets and networks depend on the provider; swaps are optional.

This package is the ASP.NET Core integration: AddOpenReceive<THost>(), MapOpenReceive() and the openreceive commands (doctor, install, reconcile, notifications, skills). It brings OpenReceive, the engine. Your app keeps its orders, users, prices and fulfillment; the engine keeps one payment-attempt row per invoice in your own database.

Quickstart: https://openreceive.org/guides/quickstart-aspnetcore.md

Requirements

Install

dotnet add package OpenReceive.AspNetCore

Route the openreceive commands in Program.cs, after builder.Build():

using OpenReceive.AspNetCore;

var app = builder.Build();
// ...
app.MapOpenReceive("/openreceive");
if (await app.TryRunOpenReceiveCommandAsync(args)) return;
app.Run();

Then scaffold the host class and the migration for the engine's two tables:

dotnet run -- openreceive install

It writes OpenReceiveHost.cs (your three hooks, AuthorizeAsync, AmountForAsync and OnPaidAsync, as marked placeholders) and either an EF Core migration (when the app has a DbContext; dotnet ef database update applies it) or a SQL file for your own migration tool, and prints the registration line:

builder.Services.AddOpenReceive<OpenReceiveHost>(options =>
    options.UseConnection(_ => new NpgsqlConnection(connectionString)));

dotnet run -- openreceive doctor reports every code as set or unset (never its value), the host and any placeholder still in it, the prefix the routes are mounted at, the tables, and the receive-only wallet preflight.

What it mounts

MapOpenReceive serves exactly the routes in openreceive-http.v1.yaml for the browser checkout (@openreceive/elements, or the standalone files on every GitHub release): POST checkouts/prepare, checkouts, payments/check, swaps/quote, swaps, swaps/status, swaps/refunds and GET rates. The amount always comes from your AmountForAsync; a payer-supplied amount is refused. At startup the engine checks that the NWC code cannot spend and refuses to boot when it can.

OnPaidAsync runs inside the settlement transaction, once per order. settlement.Session is that transaction: write through it, or let your EF Core DbContext join it with db.Database.SetDbConnection(settlement.Session.Connection) and db.Database.UseTransactionAsync(settlement.Session.Transaction), so the order's state commits or rolls back with the payment record.

Commands

Command What it does
openreceive doctor [--no-wallet] The install report; exits 1 on a failed check.
openreceive install OpenReceiveHost.cs and the tables' migration (--context, --dialect, --sql, --namespace, --force).
openreceive reconcile One gated settlement pass, for a cron job.
openreceive notifications The optional worker: NWC-02 notifications plus a periodic pass. One per deployment.
openreceive skills [--dir .claude/skills] Copies the OpenReceive agent skills into .agents/skills.

dotnet App.dll openreceive doctor runs the same commands in a published app or a container.

More

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
0.6.6 0 11/29/2026
0.6.5 0 11/29/2026
0.6.4 0 11/29/2026