Socket
Book a DemoInstallSign in
Socket

sdk-node-apis-efi

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sdk-node-apis-efi

Module for integration with Efi Bank API

1.2.25
latest
Source
npmnpm
Version published
Weekly downloads
5.8K
-60.26%
Maintainers
2
Weekly downloads
 
Created
Source

SDK Node.js para APIs Efí Pay

Banner APIs Efí Pay

Um módulo nodejs para integrar seu backend com os serviços de pagamento da Efí.

Instalação

$ npm install sdk-node-apis-efi

Uso Básico

Importe o módulo:

const EfiPay = require('sdk-node-apis-efi')
// ou
import EfiPay from 'sdk-node-apis-efi'

Insira suas credenciais e defina se deseja usar o sandbox ou não. Você também pode usar o arquivo examples/credentials.js de modelo.

module.exports = {
	// PRODUÇÃO = false
	// HOMOLOGAÇÃO = true
	sandbox: false,
	client_id: 'seuClientId',
	client_secret: 'seuClientSecret',
	certificate: 'caminho/Ate/O/Certificado/Pix',
	cert_base64: false, // Indica se o certificado está em base64 ou não
}

Instancie o módulo passando as options:

const efipay = new EfiPay(options)

Crie uma cobrança:

let chargeInput = {
	items: [
		{
			name: 'Product A',
			value: 1000,
			amount: 2,
		},
	],
}

efipay.createCharge({}, chargeInput)
	.then((resposta) => {
		console.log(resposta)
	})
	.catch((error) => {
		console.log(error)
	})

Exemplos

Para executar os exemplos, clone este repo e instale as dependências:

$ git clone git@github.com:efipay/sdk-node-apis-efi.git
$ cd sdk-node-apis-efi/examples
$ npm install

Defina suas credenciais em credentials.js:

module.exports = {
	// PRODUÇÃO = false
	// HOMOLOGAÇÃO = true
	sandbox: false,
	client_id: 'seuClientId',
	client_secret: 'seuClientSecret',
	certificate: 'caminhoAteOCertificadoPix',
	cert_base64: false, // Indica se o certificado está em base64 ou não
}

Em seguida, execute o exemplo que você deseja:

$ node createCharge.js

Documentação

A documentação completa com todos os endpoints disponíveis você encontra em: https://dev.sejaefi.com.br/.

License

MIT

Keywords

efi

FAQs

Package last updated on 23 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.