.NET Core
Learn how to install and configure our .NET Core SDK to use Efí's APIs
Requests made to Efí's APIs using the .NET Core SDK require the certificate generated in your Efí account in the .p12 format.
Installation via Visual Studio package manager
- Efí Pay
PM> Install-Package EfiPay -Version 1.0.2
Installation via NET Cli
- Efí Pay
> dotnet add package EfiPay --version 1.0.2
Installation via Git
Our SDK is also available in our Efí Github repository.
- Efí Pay
$ git clone https://github.com/efipay/sdk-dotnet-apis-efi.git
Tested with
.NET 5.0
Basic Usage
- Efí
using Efipay;
...
dynamic efi = new Efipay("client_id", "client_secret", true, "production.p12");
var body = new
{
calendario = new {
expiracao = 3600
},
devedor = new {
cpf = "12345678909",
nome = "Francisco da Silva"
},
valor = new {
original = "1.45"
},
chave = "71cdf9ba-c695-4e3c-b010-abb521a3f1be",
solicitacaoPagador = "Informe o número ou identificador do pedido."
};
var response = efi.PixCreateImmediateCharge(null, body);
Console.WriteLine(response);
Examples
You can run the examples contained in the Examples project by uncommenting the lines in the Program.cs file.
Remember to set the correct credentials Examples/credentials.json before running the examples.