Skip to main content

.NET

Learn how to install and configure our .NET SDK to use Efí APIs

Attention!

Requests made to Efí APIs using the .NET SDK require the certificate generated in your Efí account in .p12 format.


Installation via NuGet​

Package Manager
PM> Install-Package EfiPay -Version 1.0.1
NET Cli
> dotnet add package EfiPay --version 1.0.1

Instalação via Git​

Nossa SDK também está disponível em nossos respositorios no Github da Efí Pay e da Gerencianet.

$ git clone <https://github.com/efipay/sdk-dotnet-apis-efi.git>

Testado com​

dotnet 4.0.0


Uso Básico​

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);

Exemplos​


You can run the examples contained in the Examples project by uncommenting the lines in the Program.cs file.

Just remember to set the correct credentials in Examples/credentials.json before running.