Guides
Due-date charges
Create a cobv with a due date, late fee, interest and discount, and follow the payment.
The due-date charge (cobv) is Pix's boleto: it has a due date, can be paid after it for validadeAposVencimento days and accepts late fee, interest, rebate and discount. The txid is always yours (PUT /v2/cobv/:txid) and devedor is required.
Create
curl --request PUT \
--url https://pix.efi.mimicr.dev/v2/cobv/c24c8d65fd024836bc7bac75d5c4002f \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"calendario": { "dataDeVencimento": "2026-10-28", "validadeAposVencimento": 30 },
"devedor": {
"logradouro": "Alameda Souza, Numero 80",
"cidade": "Recife",
"uf": "PE",
"cep": "70011750",
"cpf": "12345678909",
"nome": "Francisco da Silva"
},
"valor": {
"original": "123.45",
"multa": { "modalidade": 2, "valorPerc": "2.00" },
"juros": { "modalidade": 2, "valorPerc": "0.30" },
"desconto": { "modalidade": 1, "descontoDataFixa": [{ "data": "2026-10-28", "valorPerc": "5.00" }] }
},
"chave": "<chave>",
"solicitacaoPagador": "Mensalidade."
}'The response is 201 with status: "ATIVA", the same valor objects, the recebedor (account data) and loc.location. Unlike the cob, the cobv has no root location. Reference: Create a due-date charge.
Late fee, interest, rebate and discount
| Object | modalidade |
|---|---|
multa | 1 = fixed amount, 2 = percentage |
juros | 1 = amount per calendar day, 2 = % per day, 3 = % per month, 4 = % per year; 5 to 8 = the same in business days |
abatimento | 1 = fixed amount, 2 = percentage |
desconto | 1 = fixed amount until the dates, 2 = percentage until the date (use descontoDataFixa, up to 3 dates); 3 to 6 = per day paid early (use valorPerc) |
All values are strings with two decimals ("2.00"). In Mimicr, charges and discounts go into the amount when the payer pays, according to the date on the sandbox clock.
Payment
In homologation, a cobv from R$ 0.01 to R$ 10.00 is paid on its own in about 3 s. For the others:
npx mimicr action efi pix.pay_cob txid=<txid> tipo=cobv
The outcome is the same as the cob's: CONCLUIDA, pix array, received Pix and /pix webhook. To pay late, advance the clock past the due date (npx mimicr clock efi +8d) and pay: late fee and interest go into the amount. After validadeAposVencimento days the charge can no longer be paid.
Revise, get and list
PATCH /v2/cobv/:txidrevises anATIVAcobv or removes it with{"status": "REMOVIDA_PELO_USUARIO_RECEBEDOR"}. OutsideATIVA, it answers400 CobVOperacaoInvalida.GET /v2/cobv/:txidgets it (with?revisao=nfor an old version). An unknowntxidanswers404 NaoEncontrado.GET /v2/cobv?inicio=…&fim=…lists, with thecpf,cnpj,status,locationPresenteandloteCobVIdfilters. The list comes incobs.
Errors
cobv errors follow BACEN's problem+json, not the cob's {nome, mensagem}:
{
"type": "https://pix.bcb.gov.br/api/v2/error/CobVOperacaoInvalida",
"title": "Cobrança inválida.",
"status": 400,
"detail": "A requisição que busca alterar ou criar uma cobrança com vencimento não respeita o _schema_ ou está semanticamente errada.",
"violacoes": [{ "razao": "O objeto cobv.devedor não respeita o _schema_.", "propriedade": "cobv.devedor" }]
}Efí does not document the repeated-txid error for cobv. In Mimicr it answers 409 txid_duplicado, in the {nome, mensagem} format, as on the cob.
Related
- Charge batches: create up to 1000 cobv at once.
- Immediate charges