How sumup/sumup-dotnet works
SumUp .NET SDK is a client library for calling the SumUp API. The main workflow is: application code configures a client, calls a generated resource client, and the shared HTTP layer builds, authenticates, sends, and deserializes requests; failures surface as typed API exceptions. Separate capabilities include reader checkouts, webhook signature verification and event handling, and OAuth token operations. The repository also contains an OpenAPI-driven SDK generator. Generated resource implementations were not sampled, so their links to the shared transport are documented only where README examples establish usage; other generated-client relationships are omitted.
Main entry points: ApiClient.cs HTTP API client · SumUpClient.cs SDK client · Events.cs Event handler · CheckoutsClient.g.cs Checkout API
Components 21
SDK entry and resources
- SDK client
src/SumUp/SumUpClient.cs - Client options
src/SumUp/SumUpClientOptions.cs - Checkout API
src/SumUp/CheckoutsClient.g.cs - Reader API
src/SumUp/ReadersClient.g.cs - Token API
src/SumUp/TokensClient.g.cs - Other resource APIs
src/SumUp - API models
src/SumUp/Models
HTTP transport
- HTTP API client
src/SumUp/Http/ApiClient.cs - Request builder
src/SumUp/Http/RequestBuilder.cs - Runtime headers
src/SumUp/Http/RuntimeHeaders.cs - API exceptions
src/SumUp/Http/ApiException.cs - Request overrides
src/SumUp/RequestOptions.cs
Webhook events
- Event handler
src/SumUp/Events.cs - Event models
src/SumUp/Events.g.cs - Event exceptions
src/SumUp/EventExceptions.cs
SDK generation
- OpenAPI spec loader
codegen/internal/spec/spec.go - SDK generator
codegen/internal/generator/generator.go - Generator CLI
codegen/main.go
Other components
- Application
- API service
- OpenAPI definition
openapi.json
Connections 25
- Application → SDK client: configures
README.md - Application → Checkout API: calls
README.md - Application → Reader API: calls
README.md - Application → Token API: uses
- SDK client → Client options: uses
src/SumUp/SumUpClient.cs - SDK client → HTTP API client: creates
src/SumUp/SumUpClient.cs - SDK client → Checkout API: exposes
- SDK client → Reader API: exposes
- SDK client → Token API: exposes
- Checkout API → HTTP API client: dispatches
- Reader API → HTTP API client: dispatches
- HTTP API client → Request builder: builds requests
src/SumUp/Http/ApiClient.cs - HTTP API client → Runtime headers: applies headers
src/SumUp/Http/ApiClient.cs - HTTP API client → Client options: gets credentials
src/SumUp/Http/ApiClient.cs - HTTP API client → Request overrides: reads overrides
src/SumUp/Http/ApiClient.cs - HTTP API client → API service: sends HTTP
src/SumUp/Http/ApiClient.cs - HTTP API client → API exceptions: throws on failure
src/SumUp/Http/ApiClient.cs - Application → Event handler: handles webhooks
README.md - SDK client → Event handler: creates handler
README.md - Event handler → Event models: uses models
README.md - Event handler → HTTP API client: fetches resource
README.md - Application → OpenAPI definition: provides specification
- Generator CLI → OpenAPI spec loader: loads spec
codegen/main.go - Generator CLI → SDK generator: runs generation
codegen/main.go - OpenAPI definition → OpenAPI spec loader: parsed by