SplatDev.Payments 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package SplatDev.Payments --version 1.0.2
                    
NuGet\Install-Package SplatDev.Payments -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SplatDev.Payments" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SplatDev.Payments" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="SplatDev.Payments" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SplatDev.Payments --version 1.0.2
                    
#r "nuget: SplatDev.Payments, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SplatDev.Payments@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SplatDev.Payments&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=SplatDev.Payments&version=1.0.2
                    
Install as a Cake Tool

SplatDev.Payments

Pure payment abstractions for .NET — defines interfaces for payments, transactions, payers, cards, subscriptions, shipments, and orders. Zero dependencies, provider-agnostic. Used as the foundation for all SplatDev payment provider implementations (Stripe, MercadoPago, PagSeguro, Getnet, Santander, BancoInter).

NuGet License: MIT

Compatibility

.NET Umbraco Package Version
8.0 13 1.0.0
10.0 17 1.0.0

Installation

dotnet add package SplatDev.Payments

Abstractions

IPayment — Base payment interface

using SplatDev.Payments.Interfaces;

public class MyPaymentProvider : IPayment
{
    public async Task<PaymentResult> CreatePaymentRequestAsync(
        IPayer payer,
        decimal amount,
        string currency,
        CancellationToken ct = default)
    {
        // Implement payment creation
    }

    public async Task<Transaction> GetTransactionAsync(
        string transactionId,
        CancellationToken ct = default)
    {
        // Implement transaction retrieval
    }

    public async Task<Transaction> ConfirmTransationAsync(
        string transactionId,
        CancellationToken ct = default)
    {
        // Implement transaction confirmation
    }
}

IPayment<T> — Generic payment interface

using SplatDev.Payments.Interfaces;

// Typed payment with provider-specific configuration
public class StripePayment : IPayment<StripeConfig>
{
    private readonly StripeConfig _config;

    public StripePayment(StripeConfig config)
    {
        _config = config;
    }

    public async Task<PaymentResult> CreatePaymentRequestAsync(
        IPayer payer,
        decimal amount,
        string currency,
        CancellationToken ct = default)
    {
        // Use _config.ApiKey, _config.WebhookSecret, etc.
    }

    // ... other IPayment members
}

Usage

Implement a custom payment provider

using SplatDev.Payments;
using SplatDev.Payments.Interfaces;

public class CustomProvider : IPayment
{
    public async Task<PaymentResult> CreatePaymentRequestAsync(
        IPayer payer,
        decimal amount,
        string currency,
        CancellationToken ct = default)
    {
        // Call the provider's API
        var response = await _httpClient.PostAsync(...);

        return new PaymentResult
        {
            Success = true,
            TransactionId = response.TransactionId,
            Status = PaymentStatus.Pending,
            RedirectUrl = response.CheckoutUrl
        };
    }

    public async Task<Transaction> GetTransactionAsync(
        string transactionId,
        CancellationToken ct = default)
    {
        // Query transaction status
    }

    public async Task<Transaction> ConfirmTransationAsync(
        string transactionId,
        CancellationToken ct = default)
    {
        // Confirm/capture the transaction
    }
}

Register in DI

// Program.cs
builder.Services.AddScoped<IPayment, CustomProvider>();

// Inject into a controller
public class CheckoutController : Controller
{
    private readonly IPayment _payment;

    public CheckoutController(IPayment payment)
    {
        _payment = payment;
    }

    [HttpPost]
    public async Task<IActionResult> Pay([FromBody] CheckoutRequest request)
    {
        var payer = new Payer
        {
            Name = request.CustomerName,
            Email = request.CustomerEmail,
            Card = new Card
            {
                Number = request.CardNumber,
                ExpirationMonth = request.ExpMonth,
                ExpirationYear = request.ExpYear
            }
        };

        var result = await _payment.CreatePaymentRequestAsync(
            payer, request.Amount, request.Currency);

        return result.Success
            ? Redirect(result.RedirectUrl!)
            : BadRequest(result.ErrorMessage);
    }
}

Features

  • Zero dependencies — pure C# interfaces, no external NuGet packages
  • IPayment — base payment operations: CreatePaymentRequestAsync, GetTransactionAsync, ConfirmTransationAsync
  • IPayment<T> — generic variant for provider-specific configuration types
  • IPayer — abstraction for payer data (name, email, address, card)
  • ICard — card details (number, expiration, CVV, holder)
  • ISubscription — recurring payment definitions with billing intervals
  • IShipment — shipping and fulfillment data
  • IOrder — order tracking and line items
  • IPaymentMethod — payment method abstraction (credit card, boleto, PIX, etc.)
  • Provider-agnostic — works with any payment gateway implementation

Provider Implementations

The following packages implement SplatDev.Payments abstractions:

Package Provider
SplatDev.Payments.Stripe Stripe
SplatDev.Payments.MercadoPago MercadoPago
SplatDev.Payments.PagSeguro PagSeguro
SplatDev.Payments.Getnet Getnet
SplatDev.Payments.Santander Santander
SplatDev.Payments.BancoInter BancoInter

Core Interfaces

Interface Purpose
IPayment Payment creation, transaction retrieval, and confirmation
IPayment<T> Generic payment interface with typed configuration
IPayer Payer information and billing data
ICard Credit/debit card details
ISubscription Recurring payment plan definition
IShipment Shipping and delivery information
IOrder Order details and line items
IPaymentMethod Payment method selection and validation

Dependencies

None — this is a pure abstractions package with no external dependencies.


SplatDev.Payments — part of the SplatDev.Umbraco.Plugins suite. Licensed under MIT. © SplatDev Ltda.

Changelog

1.0.2 — 2026-08-24

Removes a dashboard screenshot that showed an error toast. It was captured against a site where this plugin's API was unreachable, so it advertised a broken dashboard. No screenshot is better than a misleading one; a replacement will be taken against a working install.

1.0.1 — 2026-08-24

Package metadata only: the listing now carries an icon and search tags, and the project and repository links point at the organisation that actually hosts this code. No code changes.

1.0.0 — 2026-08-24

This package now keeps a changelog. Earlier releases predate it and are not reconstructed here — consult the repository history for those. From this version on, every release records what changed for someone using it.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on SplatDev.Payments:

Package Downloads
SplatDev.Payments.MercadoPago

MercadoPago payment provider for SplatDev.Payments

SplatDev.Payments.Stripe

Stripe payment provider for SplatDev.Payments — PaymentIntents, refunds, webhooks

SplatDev.Payments.PagSeguro

PagSeguro / PagBank Order API v4 payment provider for SplatDev.Payments

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 39 8/26/2026
1.0.2 74 8/24/2026