PIX, Boleto, Credit Card, PayPal, and Crypto โ all from one unified API. Drop it into any .NET or SvelteKit project and start collecting money today.
Every provider is a different world. Different APIs, different auth flows, different webhook formats. You deserve better.
Each provider has a different API, different authentication, different data formats. You're writing the same logic five times.
Reading docs, handling edge cases, managing certificates, dealing with sandbox vs production environments. It never ends.
Missed payments from webhook failures, duplicate charges, race conditions, and errors that nobody notices until customers complain.
One package. All providers included.
$ dotnet add package CodeHeroes.Payments
# or for the frontend
$ pnpm add @codeheroes/paymentsAdd your provider keys. That's it.
{ "Payments": { "Providers": {
"Pix": { "ClientId": "..." },
"Stripe": { "ApiKey": "sk_..." },
"Asaas": { "Token": "..." } } } }One API call. Any provider. Done.
var payment = await _payments
.Create(new PaymentRequest
{
Provider = Provider.Pix,
Amount = 149.90m,
Customer = customer,
WebhookUrl = "/api/webhooks"
});One interface, all providers. Switch from PIX to Stripe by changing a single enum. No provider lock-in, ever.
Every payment event verified, normalized, and delivered instantly. Consistent payload format regardless of provider.
Monitor revenue, transactions, and webhook health out of the box. Beautiful SvelteKit UI included.
HMAC and mTLS signature verification, encrypted credentials at rest, and comprehensive audit logging.
Works with any ASP.NET Core or SvelteKit project. NuGet package and npm module ready to install.
Never miss or duplicate a payment event. Built-in retry with exponential backoff and idempotency keys.
// Stripe
var stripeClient = new StripeClient(apiKey);
var svc = new PaymentIntentService(stripeClient);
var intent = await svc.CreateAsync(new PaymentIntentCreateOptions
{
Amount = 14990, Currency = "brl",
PaymentMethodTypes = new List<string> { "card" },
Metadata = new Dictionary<string, string> { ... }
});
// Asaas Boleto
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("access_token", token);
var resp = await http.PostAsJsonAsync(
"https://api.asaas.com/v3/payments",
new { billingType = "BOLETO", value = 149.90,
dueDate = "2026-04-15", ... });
// EfI PIX - certificates, OAuth, QR...
var cert = new X509Certificate2(certPath, pwd);
var handler = new HttpClientHandler();
handler.ClientCertificates.Add(cert);
// ... 80 more lines of OAuth + token caching
// ... webhook signature verification per provider
// ... different error handling per provider
// ... retry logic, idempotency, logging...var payment = await _payments.CreateAsync(
new PaymentRequest
{
Provider = Provider.Pix,
Amount = 149.90m,
Currency = "BRL",
Customer = customer,
WebhookUrl = "/api/webhooks",
Metadata = new { orderId }
});CodeHeroes Payments isn't built in isolation. It leverages our proven open-source ecosystem.
The .NET foundation โ CQRS, error handling, domain primitives, and infrastructure patterns used in production by dozens of projects.
The UI toolkit โ inputs, layouts, feedback components, and utilities that power the dashboard and checkout experience.
Every component is reusable. Every pattern is proven. Every test is green. Ship with confidence.
Start for free, scale when you're ready. No surprises.
Join 500+ developers who've simplified their payment stack.
Get Started FreeNo credit card required. MIT Licensed.