Managing emitted boletos

📘

Available Providers

Not all Custody Providers support emitting Boletos, available assets: BRLD, BRLB.

You can find the boletos emitted to a wallet by providing some search filters, such as the wallet identifier, the start and end date of the period you want to query, and the boleto status, which can take one of the following values: EMITED, PAID or ALL.

const me = await bitcapital.users().me();
const myWallet = me.wallets[0];

const boletos = await bitcapital.boletos().find(
  filters: {
    start: "2019-09-19",
    end: "2019-10-19",
    walletId: myWallet.id,
    type: "ALL"
  },
  pagination: {
    skip: 1,    // page number
    limit: 10 // number of results per page
  }
);

console.log(boletos);
curl --location --request GET 'https://instance-url.btcore.app/boletos?start=2019-07-10&end=2019-09-15&walletId=4cf5a5aa-2d31-4c21-8114-5e7342f2e3ae&limit=50&type=ALL' \
--header 'Content-Type: application/json'

Getting a single Boleto information

To retrieve the details of a boleto you must provide the boleto identifier, which can be be obtained by searching for boletos using filters, as shown on the previous page.

const boletoId = 'some_boleto_id';
const boletoDetails = await bitcapital.boletos().findOne(boletoId);

console.log(boletoDetails);
curl --location --request GET 'https://instance-url.btcore.app/boletos/54dad7e8-46f3-472e-980e-81f3120106ac' \
--header 'Content-Type: application/json'

Getting the current status from a single Boleto

The BS2 Provider suports a fine grained control of the status of the boleto, currently stating:

Status

Description

pending_registration

Boleto was created and is pending provider registration confirmation.

pending_payment

Boleto is fully registered and is pending payment.

processing_payment

Boleto was partially paid or its payment was scheduled for execution.

paid

Boleto was fully paid and is pending execution.

executed

Boleto was fully executed and the balance is available for payments.

canceled

Boleto was canceled by the provider or the issuer.

expired

Boleto was expired before the payment.


Did this page help you?