Guides
Pix

Charge with due date (cobv)

Create Pix charges with a due date, fine, interest, rebate and discount.

The charge with due date (cobv) is the "boleto in Pix": it has an identified debtor and a due date, and it can charge a fine and interest after it or give a discount before it. Scopes: cobv.write and cobv.read.

1. Create the charge

There is no POST /cobv: the txid is always yours (26 to 35 alphanumeric characters) and goes in the path of PUT /cobv/{txid}.

bash
curl --request PUT \
  --url 'https://api-pix.bb.mimicr.dev/pix/v2/cobv/exemplomvki0abacobvtxid000000?gw-dev-app-key=<app-key>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "calendario": { "dataDeVencimento": "2026-11-02", "validadeAposVencimento": 30 },
    "devedor": { "cnpj": "12345678000195", "nome": "Empresa de Teste", "cidade": "Brasília", "uf": "DF" },
    "valor": {
      "original": "150.00",
      "multa": { "modalidade": 2, "valorPerc": "2.00" },
      "juros": { "modalidade": 2, "valorPerc": "1.00" }
    },
    "chave": "e488511c-2025-4005-97ac-ff01ff2b5686"
  }'

The response (201) repeats the request and adds calendario.criacao, txid, revisao, status ATIVA, loc, location (under the /pix/v2/cobv/ path), pixCopiaECola, hiperlink and the recebedor:

json
{
  "calendario": { "criacao": "2026-10-23T01:57:15.44-03:00", "dataDeVencimento": "2026-11-02", "validadeAposVencimento": 30 },
  "recebedor": { "cnpj": "04657430000131", "nome": "QA CONTROLE ORG LTDA", "logradouro": "SETOR BANCARIO SUL QUADRA 1", "cidade": "BRASILIA", "uf": "DF", "cep": "70073900" },
  "txid": "exemplomvki0abacobvtxid000000",
  "revisao": 0,
  "location": "qrcodepix.bb.mimicr.dev/pix/v2/cobv/e1913b1b-4897-4270-9a76-be4c4c766b26",
  "status": "ATIVA"
}

Reference: Create a charge with due date.

Amount fields

FieldModalities
multa1 fixed amount, 2 percentage
juros1 amount per day, 2 % per day, 3 % per month, 4 % per year (calendar days); 5 to 8 the same in business days
abatimento1 fixed amount, 2 percentage
desconto1 fixed amount until the date, 2 percentage until the date (with descontoDataFixa, 1 to 3 dates); 3 to 6 per day paid early (with valorPerc)

valorPerc has at most two decimals. The amount paid follows Bacen's rule: original + fine + interest − rebate − discount.

In Mimicr, the charges are validated and echoed, but the simulated payment always pays valor.original, like BB's homologação simulator ("even if the QR Code has a future due date, it is paid on the day of the request").

Rules

  • devedor is required, with cpf or cnpj and nome. Without it, BB answers 400 CobVOperacaoInvalida with the cobv.devedor violation.
  • The charge can be paid until dataDeVencimento + validadeAposVencimento days (default 30). After that it can no longer be paid, but the status stays ATIVA.
  • Revising and cancelling follow the immediate charge rules: only while ATIVA; to cancel, send only {"status": "REMOVIDA_PELO_USUARIO_RECEBEDOR"}. Reference: Revise a charge with due date.

2. Pay and get it

Pay through BB's simulator with the pixCopiaECola (Pay a Pix QR Code) or through the sandbox control:

bash
npx mimicr action bb pix.pay_cob txid=exemplomvki0abacobvtxid000000

Then GET /cobv/{txid} shows status CONCLUIDA and the Pix in pix[]. Reference: Get a charge with due date.

3. List

GET /cobv works like GET /cob (inicio and fim up to 5 days apart, 404 when empty) and accepts BB's own loteCobVId filter, which returns the charges created by a batch. Reference: List charges with due date.

Boleto with Pix

Boletos registered with Pix in the API Cobranças also create a cobv, with a BOLETO… txid. It shows up in GET /cobv/{txid} and in GET /pix-bb with integracao CBR. See Boleto with Pix.