The SumUp package is the official .NET SDK for SumUp APIs. It targets all currently supported .NET releases and ships async-first clients.
Installation
Section titled “Installation”dotnet add package SumUp --prereleaseConfigure Authentication
Section titled “Configure Authentication”Set the SUMUP_ACCESS_TOKEN environment variable or pass the token into SumUpClientOptions.
export SUMUP_ACCESS_TOKEN="sup_sk_MvxmLOl0..."Examples
Section titled “Examples”Online Payment Checkout
Section titled “Online Payment Checkout”using System;using SumUp;
using var client = new SumUpClient();
var merchantResponse = await client.Merchant.GetAsync();var merchantCode = merchantResponse.Data?.MerchantProfile?.MerchantCode ?? throw new InvalidOperationException("Merchant code not returned.");
var checkoutReference = $"checkout-{Guid.NewGuid():N}";
var checkoutResponse = await client.Checkouts.CreateAsync(new CheckoutCreateRequest{ Amount = 10.00f, Currency = Currency.Eur, CheckoutReference = checkoutReference, MerchantCode = merchantCode, Description = "Test payment", RedirectUrl = "https://example.com/success", ReturnUrl = "https://example.com/webhook",});
Console.WriteLine($"Checkout ID: {checkoutResponse.Data?.Id}");Solo Cloud API Checkout
Section titled “Solo Cloud API Checkout”using SumUp;
using var client = new SumUpClient();
var readerCheckout = await client.Readers.CreateCheckoutAsync( merchantCode: "your-merchant-code", readerId: "your-reader-id", body: new CreateReaderCheckoutRequest { Description = "Coffee purchase", ReturnUrl = "https://example.com/webhook", TotalAmount = new CreateReaderCheckoutRequestTotalAmount { Currency = "EUR", MinorUnit = 2, Value = 1000, }, });
Console.WriteLine($"Reader checkout created: {readerCheckout.Data?.Data?.ClientTransactionId}");