Guides
Pix

Received Pix and refunds

Get every Pix that came into the account and refund it fully or partially.

GET /pix lists all received Pix: those that paid a charge (with txid) and those that arrived without a charge, through a static QR Code or a transfer to the key. From a Pix you can request refunds. Scopes: pix.read and pix.write.

Simulate a Pix without a charge

Pix with a txid are born when a charge is paid. For a Pix without a txid, use the pix.receive action of the sandbox control:

bash
curl --request POST \
  --url https://api.mimicr.dev/v1/bb/actions/pix.receive \
  --header 'Authorization: Bearer mk_…' \
  --header 'Content-Type: application/json' \
  --data '{ "valor": "25.00", "info_pagador": "Transferência" }'

Parameters: valor (required), chave (default: the sandbox's first key), info_pagador, payer_document and payer_name. The Pix shows up in GET /pix and in the statement, but with no webhook: BB only notifies Pix with a txid.

List and get

bash
curl --request GET \
  --url 'https://api-pix.bb.mimicr.dev/pix/v2/pix?inicio=2026-10-23T00:00:00Z&fim=2026-10-23T23:59:59Z&gw-dev-app-key=<app-key>' \
  --header 'Authorization: Bearer <token>'
json
{
  "parametros": {
    "inicio": "2026-10-23T00:00:00Z",
    "fim": "2026-10-23T23:59:59Z",
    "paginacao": { "paginaAtual": 0, "itensPorPagina": 100, "quantidadeDePaginas": 1, "quantidadeTotalDeItens": 1 }
  },
  "pix": [
    {
      "endToEndId": "E000000002026102304576VBYCAW5OYZ",
      "txid": "8IpSaxGdL5mkOpTNA6BGvJBDO6",
      "valor": "90.00",
      "componentesValor": { "original": { "valor": "90.00" } },
      "chave": "e488511c-2025-4005-97ac-ff01ff2b5686",
      "horario": "2026-10-23T01:57:15.00-03:00",
      "infoPagador": "Pedido 1",
      "pagador": { "cpf": "93492239293", "nome": "VICTOR LOPES DORNELES" },
      "devolucoes": []
    }
  ]
}
  • The period is by time of receipt, at most 5 days. With no results, BB answers 404.
  • Filters: txid, txIdPresente (BB also accepts txidPresente), devolucaoPresente, the payer's cpf or cnpj, and the pagination paginacao.paginaAtual and paginacao.itensPorPagina.
  • For a single Pix, use GET /pix/{e2eid}.

Reference: List received Pix, Get a Pix.

Refund

The refund id is yours (up to 35 alphanumeric characters). valor goes up to what has not been refunded from the Pix yet.

bash
curl --request PUT \
  --url 'https://api-pix.bb.mimicr.dev/pix/v2/pix/E000000002026102304576VBYCAW5OYZ/devolucao/Dmvki0aba?gw-dev-app-key=<app-key>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "valor": "10.00", "descricao": "Estorno parcial" }'
json
{
  "id": "Dmvki0aba",
  "rtrId": "D00000000202610230457zddf24j5184",
  "valor": "10.00",
  "natureza": "ORIGINAL",
  "descricao": "Estorno parcial",
  "horario": { "solicitacao": "2026-10-23T01:57:18.39-03:00" },
  "status": "EM_PROCESSAMENTO"
}

The PUT answers 201 in all three states (EM_PROCESSAMENTO, DEVOLVIDO, NAO_REALIZADO). While it is EM_PROCESSAMENTO, repeat the same PUT (same id) or GET it: a new id may duplicate the refund. natureza accepts ORIGINAL (default) and RETIRADA. Reference: Request a refund.

What happens next

  1. In Mimicr, the refund settles on its own about 3 s later: DEVOLVIDO with horario.liquidacao, or NAO_REALIZADO with motivo "Saldo insuficiente para realizar a devolução." if the account has no balance.
  2. If the Pix had a txid and the key has a webhook, BB sends the Pix with devolucoes[] in its final state to POST {webhookUrl}/pix (see Pix webhook).
  3. GET /pix/{e2eid}/devolucao/{id} shows the state. Reference: Get a refund.

To pick the outcome in a test, settle it before the 3 s with the pix.settle_devolucao action:

bash
npx mimicr action bb pix.settle_devolucao e2eId=E000000002026102304576VBYCAW5OYZ id=Dmvki0aba result=NAO_REALIZADO motivo="Pix não aceito pelo recebedor"

Errors

CaseResponse
valor badly formatted, zero or above what is available400 PixDevolucaoInvalida with violacoes
natureza other than ORIGINAL and RETIRADA400 PixDevolucaoInvalida
Unknown e2eid or refund404 NaoEncontrado

BB-only resources (pix-bb)

ResourceWhat it returns
GET /pix-bbThe Pix as in GET /pix, plus status (always PAGO in Mimicr) and integracao CBR when the Pix paid the QR of an API Cobranças boleto. Filters chave and contestacaoPresente (the sandbox has no contestations: true returns nothing and false returns every Pix), echoed in parametros.
GET /pix-bb/devolucoesPix with refunds whose state changed in the period, with estadoDevolucao on each refund. Filter estadoDevolucao (or statusDevolucao).
GET /pix-bb/contestacoesMED disputes. Mimicr does not simulate MED: always 404.

They accept the pix.read or pix-bb.read scope.