Introduction

ElavonPaymentsNet is a production-grade .NET 10 SDK built around the Elavon / Opayo Payments PI REST API. The project focuses on turning a complex payment integration surface into a clean, strongly-typed client library with predictable service boundaries, explicit models, and safe handling of financial operations.

Alongside the SDK itself, the repository includes a real sandbox playground, schema-backed contract documentation, and automated test coverage. The result is both a usable payment integration library and a practical example of how to structure a modern .NET SDK around a third-party payments platform.

Key Capabilities

The SDK provides complete coverage of the core payment lifecycle, including standard payments, deferred transactions, authorisation flows, refunds, voids, card identifier flows, tokenisation, Apple Pay, and EMV 3D Secure v2 support.

Rather than exposing raw JSON payloads or ad hoc request building, the library presents a structured service-based API with typed request and response models. This keeps integration code concise, consistent, and easier to test in real applications.

Architecture & SDK Design

The project is designed around a shallow public API and a centralised internal transport layer. Consumers work through a single ElavonPaymentsClient with focused service groups such as Transactions, PostPayments, ThreeDs, Tokens, Wallets, and CardIdentifiers.

Internally, HTTP communication, authentication, serialisation, and API error translation are handled in one place. Request and response mapping is implemented explicitly rather than hidden behind convention-heavy tooling, which keeps the SDK predictable, testable, and easier to maintain as the API evolves.

Payment Flows & 3D Secure

A major focus of the SDK is simplifying the operational complexity of payment integrations. The library supports the merchant session key and card identifier flow required by the API, making it straightforward to tokenize card details and submit transactions without leaking transport concerns into application code.

The SDK also supports EMV 3D Secure v2 flows, including challenge handling and completion. This allows cardholder verification to be integrated through strongly-typed models and explicit flow control rather than custom endpoint wiring and manual payload handling.

Reliability, Error Handling & Safety

The HTTP layer is built with safe-by-default behaviour for payment operations. Authentication failures, validation problems, payment declines, rate limits, server failures, and transport faults are surfaced through a typed exception hierarchy so consuming applications can handle each case explicitly.

Resilience is applied carefully: retry behaviour is limited to safe request patterns, while financial POST operations are never retried automatically. This avoids duplicate side effects while still improving reliability around transient failures in the surrounding transport layer.

Playground & Real Sandbox Scenarios

Alongside the SDK, the project includes a dedicated playground used to exercise the API against the real Elavon sandbox. Rather than relying on mocked examples, the playground runs end-to-end payment scenarios through the same client surface exposed to SDK consumers.

The scenarios cover successful payments, deferred payments followed by capture, full and partial refunds, void operations, reusable card identifier flows, and controlled decline cases. This makes the playground a practical validation tool as well as a working reference for how the SDK is intended to be used.

Testing & Quality

The project includes a structured automated test suite covering request mapping, response mapping, guard clauses, status handling, and service behaviour. This helps ensure that changes to the SDK surface or internal transport logic do not introduce regressions.

In addition to automated testing, the repository is backed by continuous integration and real sandbox validation through the playground. The result is an SDK that is not only cleanly designed, but also exercised against real-world payment scenarios and edge cases.

SDK Surface Definition

The repository includes a machine-readable SDK contract in sdk-surface.yaml, supported by schema fixtures for request and response examples. This provides a clear, tool-friendly representation of the SDK surface beyond conventional README documentation.

Keeping the service contract explicit in this way helps align implementation, tests, and documentation. It also makes the project easier to reason about for contributors, integrators, and future automation workflows.

Outcome / Repository

The result is a reusable .NET payment SDK that reduces the complexity of integrating with the Elavon / Opayo PI REST API. It provides a maintainable, production-oriented abstraction over payment operations, while also serving as a practical example of how to structure a modern .NET SDK around external financial APIs..

Repository

View the full source code on GitHub:
https://github.com/untiedshoes/ElavonPaymentsNet

Get in touch.

Drop me an email about your project - I’d love to hear from you.

Like a Chat?

  • 07712 288478
  • craig@untiedshoes.co.uk

© Copyright UntiedShoes 2026, all rights reserved