.NET Library
Integrate the Integrated POS into your application using the .NET library.
Installation
- Place the
PosIntegrado.Api.dllandPosIntegrado.Api.xmlfiles provided in the release package into your project’slibs/directory. - Add a reference to the
PosIntegrado.Api.dllfile within your project.
Key namespaces
Include the following key namespaces in your code:
using PosIntegrado.Api;
using PosIntegrado.Api.Abstractions;Connector creation
Create a connector instance to communicate via USB or HTTP (Network) using the respective methods:
Output HTTP connection
var connector = Connector.CreateHttp("192.168.1.100", 8080);Output USB connection
var connector = Connector.CreateUsb("COM3");Error handling
Check the Result<T> pattern to handle expected business logic rather than relying on exceptions:
var response = connector.SomeOperation(request);
if (response.IsSuccess)
{
// Proceed with response.Value
}
else
{
// Handle error with response.Error
}Sale flow example
Review the following example demonstrating the structure of a single-step sale flow:
// 1. Initialize connector
var connector = Connector.CreateHttp("192.168.1.100", 8080);
// 2. Build the request
var request = new SaleRequest
{
Amount = 15000,
SaleType = SaleType.Card,
PrintOnPos = true
};
// 3. Execute the sale
var result = connector.Sale(request);
// 4. Handle the result
if (result.IsSuccess)
{
var saleResponse = result.Value;
Console.WriteLine($"Sale Approved: {saleResponse.AuthorizationCode}");
}
else
{
Console.WriteLine($"Sale Failed: {result.Error.Message}");
}Next steps
- Run the full flow end to end with the Quick Start guide.
- Look up every method signature and parameter in the Methods and Parameters Reference.
English › Documentation › Documentation › In-Store Payments › Integrated POS › First Steps › Configuring