eQuantic.Payment 1.3.0

dotnet add package eQuantic.Payment --version 1.3.0
                    
NuGet\Install-Package eQuantic.Payment -Version 1.3.0
                    
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="eQuantic.Payment" Version="1.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="eQuantic.Payment" Version="1.3.0" />
                    
Directory.Packages.props
<PackageReference Include="eQuantic.Payment" />
                    
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 eQuantic.Payment --version 1.3.0
                    
#r "nuget: eQuantic.Payment, 1.3.0"
                    
#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 eQuantic.Payment@1.3.0
                    
#: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=eQuantic.Payment&version=1.3.0
                    
Install as a Cake Addin
#tool nuget:?package=eQuantic.Payment&version=1.3.0
                    
Install as a Cake Tool

eQuantic.Payment

One contract for every payment gateway: the same request, the same response, and the provider and API version that answered, always. The gateways live in their own packages and plug into this one.

Install

dotnet add package eQuantic.Payment
dotnet add package eQuantic.Payment.Stripe   # or any other provider package

Register

using eQuantic.Payment.DependencyInjection;
using eQuantic.Payment.Stripe;

services.AddPayments(payments => payments
    .AddStripe(o => o.ApiKey = configuration["Stripe:ApiKey"]!, asDefault: true));

Charge

using eQuantic.Payment.Abstractions;
using eQuantic.Payment.Models;
using eQuantic.Payment.Models.Requests;

var provider = factory.GetDefault();                 // IPaymentProviderFactory, from DI
var response = await provider.Charges.CreateAsync(new CreateChargeRequest
{
    Amount = Money.Brl(49.90m),
    Method = PaymentMethodType.Pix,
});

if (response.Success)
{
    Console.WriteLine($"{response.Data!.Id} via {response.Provider.Key}");
}

What is in it

  • Contracts: IPaymentProvider with its Charges, Refunds, Customers, PaymentMethods and Notifications operations, and IPaymentProviderFactory, which resolves a provider by name, by name and version, or the default. Notifications.Verify checks that a webhook came from the gateway before parsing it; PaymentMethods saves a customer's card to charge it later with the customer away (CreateChargeRequest.OffSession); Customers.UpdateAsync keeps a customer in step. A provider that does not do one of these yet answers with a failure.
  • The unified model: CreateChargeRequest, CaptureRequest, CancelRequest, RefundRequest, CustomerRequest; Charge, Customer, Refund, with the Pix, boleto and card details each method returns; Money in centavos.
  • PaymentResponse<T>: the result or a PaymentError, the provider and version that answered, and the gateway's raw body for auditing. A failure can still carry what the gateway returned about the object: a declined charge comes back with its id and status.
  • The registration: AddPayments(...) and the PaymentBuilder the provider packages extend.

Retries

What moves money (create, capture, cancel and refund) takes an IdempotencyKey, so a retry after a timeout is answered with the first result instead of charging twice. Use one key per operation, derived from your own id for the attempt and the operation (attempt-42:create, attempt-42:refund), and reuse it only to retry that same request: a gateway refuses a key reused with other parameters. Set AttemptedAt with the key, to the moment of the first try, and send it again with every retry, so what counts from the moment of the request (a Pix expiry, a boleto's days) comes out the same; left out, each call counts from its own moment. Keep the key to 64 characters, Adyen's limit. The table below says what each gateway gets. A customer's creation takes a key too (CustomerRequest.IdempotencyKey): Stripe sends it, and the other gateways ignore it.

Providers

Package Gateway Idempotency key
eQuantic.Payment.Stripe Stripe Idempotency-Key, the caller's; none without one
eQuantic.Payment.Pagarme Pagar.me none sent
eQuantic.Payment.MercadoPago Mercado Pago X-Idempotency-Key, the caller's; without one, a fresh key, except on a Payments API capture or cancel, which carries none
eQuantic.Payment.PagSeguro PagSeguro / PagBank x-idempotency-key, the caller's or a fresh one
eQuantic.Payment.Cielo Cielo none sent
eQuantic.Payment.Adyen Adyen Idempotency-Key, the caller's or a fresh one
eQuantic.Payment.Asaas Asaas none sent
eQuantic.Payment.Efi Efí (Gerencianet) none sent

Source, design notes and the other packages: https://github.com/eQuantic/core-payment.

Product Compatible and additional computed target framework versions.
.NET 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.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on eQuantic.Payment:

Package Downloads
eQuantic.Payment.Stripe

Stripe API client for eQuantic.Payment. Versioned client (REST v1, pinned Stripe-Version) plus the unified IPaymentProvider adapter.

eQuantic.Payment.Pagarme

Pagar.me API client for eQuantic.Payment. Versioned clients (Core API v4 and v5) plus the unified IPaymentProvider adapter.

eQuantic.Payment.PagSeguro

PagSeguro / PagBank API client for eQuantic.Payment. Modern Orders/Charges API (versioned) plus the unified IPaymentProvider adapter.

eQuantic.Payment.Asaas

Asaas API client for eQuantic.Payment. Versioned client (API v3) plus the unified IPaymentProvider adapter with real customer support (PIX, boleto, credit card).

eQuantic.Payment.MercadoPago

Mercado Pago API client for eQuantic.Payment. Versioned clients (Payments API and Orders API) plus the unified IPaymentProvider adapter.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.0 273 10/1/2026
1.2.0 148 10/1/2026
1.1.0 156 10/1/2026
1.0.0 161 9/30/2026