Install package
dotnet add package NordAPI.Swish
NuGet package contains client, models and helpers for Swish.
Swish & BankID SDK by NordAPI • mTLS • HMAC • Anti-replay
dotnet add package NordAPI.Swish
NuGet package contains client, models and helpers for Swish.
var swish = new SwishClient(cfg => cfg.UseDevDefaults());
await swish.PayAsync(new SwishPaymentRequest {
Amount = 100m, Currency = "SEK", PayerAlias = "46712345678",
Message = "Order #123"
});
Configure certs + mTLS for prod. See checklist below.
app.MapPost("/swish/webhook", async (HttpRequest req) => {
var evt = await SwishWebhook.ParseAsync(req);
if (!evt.IsValid) return Results.Unauthorized();
// handle payment success/failed here
return Results.Ok();
});
HMAC validation and nonce-replay protection built-in.
mTLS, HMAC, nonce/replay protection and request signing out-of-the-box.
Production-ready client, minimal plumbing and sane defaults for .NET.
End-to-end flow: create payments, receive callbacks, verify and persist.
Structured logging and IDs that make troubleshooting straightforward.
Go from zero to sandbox in minutes. Verified webhooks, mTLS helpers, and clean .NET APIs — designed for production from day one.
Follow the checklist for timestamp strictness (±5 min), persistent nonces, HTTPS only, and secrets via KeyVault/env.