Inter JS is a library to help you to interact with Inter API
Inter JS is a library to help you to interact with Inter API
npm install --save inter-js
const sdk = require('inter-js')
const cert = 'your-cert';
const key = 'your-key';
const production = false;
const InterApi = sdk.init(cert, key, production)
const cobranca = {
seuNumero: '123',
valorNominal: 2.5,
dataVencimento: new Date(),
numDiasAgenda: 0,
pagador: {
cpfCnpj: '12345678909',
nome: 'Fulano de Tal',
ddd: '11',
telefone: '123456789',
cep: '12345678',
endereco: 'Rua Tal',
numero: '123',
complemento: '',
bairro: 'Bairro Tal',
cidade: 'São Paulo',
uf: 'SP',
tipoPessoa: 'FISICA'
}
}
const response = await InterApi.cobranca.create(cobranca);
console.log(response)
// Output { codigoSolicitacao: '123' }
const webhook = {
webhookUrl: 'https://example.com'
}
const response = await InterApi.cobranca.updateWebhook(webhook);
console.log(response)
// Output { webhookUrl: 'https://example.com'}
Please consult CONTRIBUTING for guidelines on contributing to this project.
inter-js © Marcos Porto, Released under the Apache-2.0 License.