codigo usado const efiPay = new EfiPay(efiCredentials)
const body = {
calendario: {
expiracao: expiration,
},
devedor: {
cpf: userCpf,
nome: userName,
},
valor: {
original: value.toFixed(2),
},
chave: process.env.PIX,
}
const pix = await efiPay.pixCreateImmediateCharge([], body)
console.log(pix)
const params = {
id: pix.loc.id,
}
const qrCode = await efiPay.pixGenerateQRCode(params)
return { qrCode, pix }