sdk-node-apis-efi
Version:
Module for integration with Efi Bank API
33 lines (28 loc) • 718 B
JavaScript
const EfiPay = require('sdk-node-apis-efi')
const options = require('../../credentials')
let params = {
id: 0,
}
let body = {
payment: {
banking_billet: {
expire_at: '2023-12-01',
customer: {
name: 'Gorbadoc Oldbuck',
email: 'oldbuck@efipay.com.br',
cpf: '94271564656',
birth: '1977-01-15',
phone_number: '5144916523',
},
},
},
}
const efipay = new EfiPay(options)
// O método definePayMethod indica os campos que devem ser enviados e que serão retornados
efipay.definePayMethod(params, body)
.then((resposta) => {
console.log(resposta) // Aqui você tera acesso a resposta da API e os campos retornados de forma intuitiva
})
.catch((error) => {
console.log(error)
})