SplatDev.Payments.PagSeguro
1.0.2
dotnet add package SplatDev.Payments.PagSeguro --version 1.0.2
NuGet\Install-Package SplatDev.Payments.PagSeguro -Version 1.0.2
<PackageReference Include="SplatDev.Payments.PagSeguro" Version="1.0.2" />
<PackageVersion Include="SplatDev.Payments.PagSeguro" Version="1.0.2" />
<PackageReference Include="SplatDev.Payments.PagSeguro" />
paket add SplatDev.Payments.PagSeguro --version 1.0.2
#r "nuget: SplatDev.Payments.PagSeguro, 1.0.2"
#:package SplatDev.Payments.PagSeguro@1.0.2
#addin nuget:?package=SplatDev.Payments.PagSeguro&version=1.0.2
#tool nuget:?package=SplatDev.Payments.PagSeguro&version=1.0.2
SplatDev.Payments.PagSeguro
PagSeguro / PagBank Order API v4 payment provider for the SplatDev.Payments abstraction layer.
Compatibility
| .NET | Package Version |
|---|---|
| 8.0 | 1.0.0 |
| 10.0 | 1.0.0 |
Target API
PagBank Order API v4 (api.pagseguro.com production, sandbox.api.pagseguro.com sandbox). The legacy PagSeguro v2 API is sunset — this adapter targets v4 exclusively.
Installation
dotnet add package SplatDev.Payments.PagSeguro
Configuration
{
"SplatDev": {
"Payments": {
"PagSeguro": {
"Token": "YOUR_PAGBANK_TOKEN",
"Environment": "Sandbox",
"WebhookSecret": "YOUR_WEBHOOK_SECRET",
"TimeoutSeconds": 30
}
}
}
}
Usage
// Program.cs
builder.Services.AddSplatDevPagSeguro(builder.Configuration);
// In your controller
public class CheckoutController : ControllerBase
{
private readonly PagSeguroService _pagSeguro;
public CheckoutController(PagSeguroService pagSeguro)
{
_pagSeguro = pagSeguro;
}
public async Task<IActionResult> CreateOrder()
{
var order = new PagSeguroOrderRequest
{
ReferenceId = "ORDER-001",
Customer = new PagSeguroCustomer { Name = "John Doe", Email = "john@example.com", TaxId = "12345678909" },
Items = new() { new PagSeguroItem { Name = "Product", Quantity = 1, UnitAmount = 10000 } },
Charges = new()
{
new PagSeguroCharge
{
Description = "First charge",
Amount = new PagSeguroAmount { Value = 10000, Currency = "BRL" },
PaymentMethod = new PagSeguroPaymentMethod
{
Type = "CREDIT_CARD",
Installments = 1,
Capture = true,
Card = new PagSeguroCard
{
Number = "4111111111111111",
ExpMonth = "12",
ExpYear = "2026",
SecurityCode = "123",
Holder = new PagSeguroCardHolder { Name = "John Doe", TaxId = "12345678909" }
}
}
}
}
};
var result = await _pagSeguro.CreateOrderAsync(order);
return Ok(result);
}
}
Supported payment methods
| Method | Type value |
|---|---|
| Credit card | CREDIT_CARD |
| Debit card | DEBIT_CARD |
| Boleto | BOLETO |
| PIX | PIX |
Webhook verification
[HttpPost("webhook")]
public async Task<IActionResult> Webhook()
{
using var reader = new StreamReader(Request.Body);
var rawBody = await reader.ReadToEndAsync();
if (!_pagSeguro.VerifyWebhookSignatureAsync(rawBody, Request.Headers["X-Hub-Signature"]))
return Unauthorized();
var payload = JsonSerializer.Deserialize<PagSeguroWebhookPayload>(rawBody);
// handle order status update
return Ok();
}
Dependencies
| Package | Purpose |
|---|---|
SplatDev.Payments |
Base payment abstractions |
Microsoft.AspNetCore.App |
HttpClient + IOptions |
Built on System.Text.Json — no third-party JSON library required.
SplatDev — pragmatic tools for .NET developers.
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 | Versions 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. |
-
net10.0
- SplatDev.Payments (>= 1.0.2)
-
net8.0
- SplatDev.Payments (>= 1.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2 | 45 | 8/24/2026 |