Guides
API Pix

Charge batches

Create up to 1000 due-date charges in one request and check which were created and which were denied.

The batch (/v2/lotecobv) creates several cobv at once. Each charge is validated on its own: valid ones become CRIADA and invalid ones NEGADA with the reason, without bringing the whole batch down.

Efí warns that this endpoint is disabled for maintenance. Mimicr keeps it working, with the documented rules, so you can test the integration.

Create the batch

The batch id is yours. Each cobsv item has the same format as the PUT /v2/cobv/:txid body, plus the txid:

bash
curl --request PUT \
  --url https://pix.efi.mimicr.dev/v2/lotecobv/1 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "descricao": "Mensalidades de novembro",
    "cobsv": [
      {
        "txid": "fb2761260e554ad593c7226beb5cb650",
        "calendario": { "dataDeVencimento": "2026-10-28", "validadeAposVencimento": 30 },
        "devedor": { "cpf": "12345678909", "nome": "Francisco da Silva" },
        "valor": { "original": "123.45" },
        "chave": "<chave>",
        "solicitacaoPagador": "Mensalidade."
      },
      {
        "txid": "fb2761260e554ad593c7226beb5cb651",
        "calendario": { "dataDeVencimento": "2026-10-28" },
        "devedor": { "cpf": "1", "nome": "X" },
        "valor": { "original": "123.45" },
        "chave": "<chave>"
      }
    ]
  }'

The response is 202 with no body. An empty batch, one with more than 1000 items or without descricao answers 400 LoteCobVOperacaoInvalida.

Check the result

bash
curl --url https://pix.efi.mimicr.dev/v2/lotecobv/1 \
  --header 'Authorization: Bearer <token>'
json
{
  "id": 1,
  "descricao": "Mensalidades de novembro",
  "criacao": "2026-10-21T23:40:09.100Z",
  "cobsv": [
    { "txid": "fb2761260e554ad593c7226beb5cb650", "status": "CRIADA", "criacao": "2026-10-21T23:40:08.986Z" },
    {
      "txid": "fb2761260e554ad593c7226beb5cb651",
      "status": "NEGADA",
      "problema": {
        "type": "https://pix.bcb.gov.br/api/v2/error/CobVOperacaoInvalida",
        "title": "Cobrança inválida.",
        "status": 400,
        "violacoes": [{ "razao": "Documento CPF em devedor.cpf é inválido.", "propriedade": "cobv" }]
      }
    }
  ]
}

NEGADA charges do not exist: they do not show up in GET /v2/cobv. The created ones are regular cobv, paid and notified as in Due-date charges. To list only the batch's, use GET /v2/cobv?inicio=…&fim=…&loteCobVId=1.

Rules

  • Another PUT on the same batch must carry exactly the same txids. You cannot add or remove charges.
  • PATCH /v2/lotecobv/:id revises a subset of the batch's charges (for example, a new due date or amount). A txid that is not in the batch answers 400. The response is also 202 with no body.
  • A cobv created through PUT /v2/cobv/:txid cannot join a batch, and a batch cobv cannot move to another batch.

Scopes

Efí's docs swap the batch scopes (read to write and vice versa). Mimicr uses the pattern of the other routes: lotecobv.write for PUT and PATCH, lotecobv.read for GET.

Reference: Create a batch, Revise a batch, Get a batch and List batches.