Guides
Pix

Cobv batches and locations

Create up to 500 charges with due date in one call and reserve QR Code URLs before creating the charge.

Batches of charges with due date

A batch (lotecobv) creates several cobv at once. BB processes the batch and reports, charge by charge, whether it was CRIADA or NEGADA. Scopes: lotecobv.write and lotecobv.read. This is a resource where BB departs from Bacen's standard.

1. Send the batch

The batch id is yours (free text up to 140 characters). Each cobsv item has the txid and the same fields as PUT /cobv/{txid}, up to 500 items.

bash
curl --request PUT \
  --url 'https://api-pix.bb.mimicr.dev/pix/v2/lotecobv/lotemvki0aba?gw-dev-app-key=<app-key>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "descricao": "Mensalidades",
    "cobsv": [
      {
        "txid": "lotemvki0abacobv00000000000000",
        "calendario": { "dataDeVencimento": "2026-11-07" },
        "devedor": { "cpf": "12345678909", "nome": "Aluno 1" },
        "valor": { "original": "100.00" },
        "chave": "e488511c-2025-4005-97ac-ff01ff2b5686"
      },
      {
        "txid": "curto",
        "calendario": { "dataDeVencimento": "2026-11-07" },
        "devedor": { "cpf": "12345678909", "nome": "Aluno 2" },
        "valor": { "original": "100.00" },
        "chave": "e488511c-2025-4005-97ac-ff01ff2b5686"
      }
    ]
  }'

The response is 202 with no body. The batch is accepted even with invalid charges: only those become NEGADA. The whole batch is refused (400 LoteCobVOperacaoInvalida) only if cobsv is empty, has more than 500 items or descricao exceeds 140 characters. Reference: Create a cobv batch.

2. Get the result

bash
curl --request GET \
  --url 'https://api-pix.bb.mimicr.dev/pix/v2/lotecobv/lotemvki0aba?gw-dev-app-key=<app-key>' \
  --header 'Authorization: Bearer <token>'
json
{
  "id": "lotemvki0aba",
  "descricao": "Mensalidades",
  "criacao": "2026-10-23T01:57:16.12-03:00",
  "cobsv": [
    { "txid": "lotemvki0abacobv00000000000000", "status": "CRIADA", "criacao": "2026-10-23T01:57:16.36-03:00" },
    {
      "txid": "curto",
      "status": "NEGADA",
      "criacao": "2026-10-23T01:57:16.12-03:00",
      "problema": {
        "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 campo txid não respeita o _schema_.", "propriedade": "txid", "valor": "curto" }],
        "correlationId": null
      }
    }
  ]
}

CRIADA charges are regular cobv: they show up in GET /cobv/{txid} and in GET /cobv?loteCobVId=lotemvki0aba. Reference: Get a cobv batch, List cobv batches.

At BB, items may stay EM_PROCESSAMENTO for a while. In Mimicr, the batch is processed at once: a GET right after the PUT already shows CRIADA or NEGADA.

3. Revise the batch

PATCH /lotecobv/{id} revises or cancels ATIVA charges of the batch. In cobsv, send the txid and only the fields to change, or "status": "REMOVIDA_PELO_USUARIO_RECEBEDOR". It also answers 202 with no body; each item's result shows up when you get the batch.

bash
curl --request PATCH \
  --url 'https://api-pix.bb.mimicr.dev/pix/v2/lotecobv/lotemvki0aba?gw-dev-app-key=<app-key>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "cobsv": [{ "txid": "lotemvki0abacobv00000000000000", "valor": { "original": "110.00" } }] }'

Reference: Revise a cobv batch.

Locations

A location is the payload URL the QR Code points to. Every cob and cobv gets one automatically, but you can reserve one first, for example to print the QR before you know the amount. Scopes: payloadlocation.write and payloadlocation.read.

Reserve

bash
curl --request POST \
  --url 'https://api-pix.bb.mimicr.dev/pix/v2/loc?gw-dev-app-key=<app-key>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "tipoCob": "cob" }'
json
{
  "id": 1005,
  "location": "qrcodepix.bb.mimicr.dev/pix/v2/4b8492aa-514a-4385-b015-370565fd2d42",
  "tipoCob": "cob",
  "criacao": "2026-10-23T01:57:17.17-03:00"
}

The reservation does not expire. Use the id in "loc": {"id": 1005} when creating a charge of the same tipoCob; a location of another type or already bound to another charge answers 400. At BB, the location points to qrcodepix-h.bb.com.br; in Mimicr, to qrcodepix.bb.mimicr.dev. Reference: Create a location.

  • Get a location: txid only appears while a charge is bound.
  • Unlink the charge: DELETE /loc/{id}/txid returns the location without txid. The charge keeps its status and revisao, but loses the location and the QR Code.
  • List locations: inicio and fim (up to 5 days), txIdPresente, tipoCob. The list comes under the loc key; when empty, it answers 404.

BB does not offer GET /loc/{id}/qrcode: render the image from the charge's pixCopiaECola.