Ponto API Nodejs client
Based on their REST API
- Authentication and accessToken management
- Accounts
- Synchronisation of account details
npm install ponto
const Ponto = require('ponto')
const sandboxMode = true
const ponto = new Ponto()('<ponto_client_id>', '<ponto_client_secret>', sandboxMode)
Notes:
- Ponto can be initialised in sandbox mode for testing purpose.
const pagingParameters = {
limit: 2, // Defaults :100
before: '<financialInstitutionId>', // cursor for pagination
after: '<financialInstitutionId>', // cursor for pagination
}
const response = await ponto.listFinancialInstitutions(pagingParameters)
const { meta, data, links, next, previous } = response
if (response.next) {
const nextPageResponse = await response.next()
}
Notes :
pagingParameters.before
&pagingParameters.after
cannot be used together- All list functions return a paging result. If they have a next or previous page a next or previous async function will be present.
more info
const response = await ponto.getFinancialInstitution('<financialInstitutionId>')
const { data } = response
more info
const pagingParameters = {
limit: 2, // Defaults :100
before: '<financialInstitutionId>', // cursor for pagination
after: '<financialInstitutionId>', // cursor for pagination
}
const response = await ponto.listFinancialInstitutionAccounts('<financialInstitutionId>', pagingParameters)
const { meta, data, links, next, previous } = response
if (response.next) {
const nextPageResponse = await response.next()
}
Notes :
pagingParameters.before
&pagingParameters.after
cannot be used together- All list functions return a paging result. If they have a next or previous page a next or previous async function will be present.
more info
const response = await ponto.getFinancialInstitutionAccount('<financialInstitutionId>', '<financialInstitutionAccountId>')
const { data } = response
more info
const pagingParameters = {
limit: 2, // Defaults :100
before: '<financialInstitutionId>', // cursor for pagination
after: '<financialInstitutionId>', // cursor for pagination
}
const response = await ponto.listFinancialInstitutionTransactions('<financialInstitutionId>', '<financialInstitutionAccountId>', pagingParameters)
const { meta, data, links, next, previous } = response
if (response.next) {
const nextPageResponse = await response.next()
}
Notes :
pagingParameters.before
&pagingParameters.after
cannot be used together- All list functions return a paging result. If they have a next or previous page a next or previous async function will be present.
more info
const response = await ponto.getFinancialInstitutionTransaction('<financialInstitutionId>', '<financialInstitutionAccountId>', '<financialInstitutionTransactionId>')
const { data } = response
more info
const pagingParameters = {
limit: 2, // Defaults :100
before: '<accountId>', // cursor for pagination
after: '<accountId>', // cursor for pagination
}
const response = await ponto.listAccounts(pagingParameters)
const { meta, data, links, next, previous } = response
if (response.next) {
const nextPageResponse = await response.next()
}
Notes :
pagingParameters.before
&pagingParameters.after
cannot be used together- All list functions return a paging result. If they have a next or previous page a next or previous async function will be present.
more info
const response = await ponto.getAccount('<accountId>')
const { data } = response
more info
const response = await ponto.syncAccount('<accountId>')
const { data } = response
more info
const response = await ponto.getSynchronization('<synchronizationId>')
const { data } = response
more info
const pagingParameters = {
limit: 2, // Defaults :100
before: '<accountId>', // cursor for pagination
after: '<accountId>', // cursor for pagination
}
const response = await ponto.listAccounts('<accountId>', pagingParameters)
const { meta, data, links, next, previous } = response
if (response.next) {
const nextPageResponse = await response.next()
}
Notes :
pagingParameters.before
&pagingParameters.after
cannot be used together- All list functions return a paging result. If they have a next or previous page a next or previous async function will be present.
more info
const response = await ponto.getTransaction('<accountId>', t'<ransactionId>')
const { data } = response
more info