Payment abstraction library and API clients for Brazilian financial services. Part of the NuvTools Framework.
| Project | Target | Description |
|---|---|---|
| NuvTools.Payment | net8.0, net9.0, net10.0 | Core payment abstractions for credit card, bank payment slip and other operations. |
| NuvTools.Payment.BancoDoBrasil.ApiClient | net10.0 | API client for Banco do Brasil bank slip payment services. |
| NuvTools.Payment.Sicoob.ApiClient | net10.0 | API client for Sicoob bank slip services. |
| NuvTools.Payment.Omie.ApiClient | net10.0 | API client for Omie ERP: service orders, accounts receivable, and bank slip (boleto) generation. |
Typed HTTP client for the Banco do Brasil Payments API with OAuth2 authentication.
- OAuth2 token generation (
client_credentials) - Batch bank slip payment creation
- Payment query by ID
{
"BancoDoBrasil": {
"AuthUrl": "https://...",
"BaseUrl": "https://...",
"ClientId": "",
"ClientSecret": "",
"ApiKey": ""
}
}services.AddBancoDoBrasilApiClient(configuration);Typed HTTP client for the Sicoob Banking API (bank slips).
- Bank slip query by number or period
- Bank slip creation
- Second copy generation
- Cancellation, due date extension, and amount change
{
"Sicoob": {
"BaseUrl": "https://...",
"ClientId": "",
"Token": ""
}
}services.AddSicoobApiClient(configuration);Typed HTTP client for the Omie ERP API (service orders, accounts receivable, and bank slip issuance).
- Client lookup
- Service registration query
- Service order (OS) creation
- Accounts receivable entry creation
- Bank slip (boleto) generation and retrieval
{
"Omie": {
"AppKey": "",
"AppSecret": "",
"BaseUrlClient": "https://...",
"BaseUrlService": "https://...",
"BaseUrlOrderService": "https://...",
"BaseUrlOrderBilling": "https://..."
}
}services.AddOmieApiClient(configuration);All API clients share the same infrastructure, provided by NuvTools.Payment:
- Result pattern: every method returns
IResult<T>fromNuvTools.Common.ResultWrapper(Succeeded,Data,Message,Messages,ResultType). - Standard resilience: registered via
services.AddPaymentResilientHttpClient<TInterface, TImpl>(name)— applies retry, circuit breaker, and timeout policy across all providers. - Configuration binding from
IConfigurationsections using the Options pattern.
Each provider exposes its own contract (ISicoobBankSlipApiClient, IBbBankSlipPaymentApiClient, IOmieApiClient) that returns provider-specific DTOs. There is no provider-neutral domain layer — Brazilian banking integrations are intrinsically provider-shaped, so the API stays direct.
Note (Omie):
OmieApiClientis registered as a singleton and uses an internal staticHttpClient. It intentionally bypassesHttpClientFactoryand the standard resilience pipeline — Omie's gateway misbehaves with HTTP/2 and Polly retry. Do not change this without re-validating against the Omie sandbox.
dotnet build NuvTools.Payment.slnx