A minimal ASP.NET example showing how to integrate the Sanwo .NET SDK with Tag Helpers for checkout buttons and custom amount forms.
dotnet new webapp -o SanwoExample
cd SanwoExampledotnet add package SanwoCopy these files into your ASP.NET project:
Program.cs → Program.cs
appsettings.json → appsettings.json
Pages/_ViewImports.cshtml → Pages/_ViewImports.cshtml
Pages/Shared/_Layout.cshtml → Pages/Shared/_Layout.cshtml
Pages/Index.cshtml → Pages/Index.cshtml
Pages/Index.cshtml.cs → Pages/Index.cshtml.cs
dotnet runOpen http://localhost:5000 — you should see the Sanwo payment demo page.
<sanwo-scripts />— loads the Sanwo embed script from CDN<sanwo-checkout />— renders a checkout button with data attributes- Multiple providers — Paystack, Flutterwave, and Monnify buttons
<sanwo-custom-amount />— renders a custom amount form (donation use case)appsettings.json— centralized configuration via DI- JavaScript callback — handles payment results
- .NET 8.0 or 9.0