Guides
Homologação
BB's payment simulators, the convênio and test data, the values that force outcomes and the sandbox switches.
BB's homologação has no payer or bank on the other side: it offers two payment simulators and a set of fixed data. Mimicr reproduces both simulators and accepts the same data. For everything BB doesn't simulate (Pix without txid, refunds, batch payments), use the control API actions; see Sandbox control.
Pix payment simulator
Pays an ATIVA cob or cobv from its copia e cola, as BB's test payer:
curl --request POST \
--url 'https://bb.mimicr.dev/testes-portal-desenvolvedor/v1/boletos-pix/pagar?gw-dev-app-key=<app-key>' \
--header 'Content-Type: application/json' \
--data '{ "pix": "<pixCopiaECola>" }'{"code": 1,"texto": "E000000002026102304576VBYCAW5OYZ"}textois theendToEndIdof the new Pix. The charge becomesCONCLUIDAright away.- No token is needed. The app key can be your sandbox's or BB's public portal key,
95cad3f03fd9013a9d15005056825665, ingw-dev-app-keyorgw-app-key. - The payer is always
VICTOR LOPES DORNELES, CPF93492239293, and the amount is the charge's. A cobv is paid at its original value, on the day, even with a future due date. - Empty copia e cola:
422withcode421. A copia e cola that doesn't point to a Mimicr charge, or a charge that isn'tATIVA:500ERRO_SISTEMA, with the reason invariaveisMonitoradas.
See Pay a Pix QR Code (simulator). To choose the payer, use the pix.pay_cob action with payer_document and payer_name.
Boleto payment simulator
Pays an open boleto of the Cobranças API by its linha digitável (47 digits) or barcode (44):
curl --request POST \ --url 'https://bb.mimicr.dev/testes-portal-desenvolvedor/v1/boletos-cobranca/00190000090312855700031443497172516280000015000/pagar?gw-app-key=95cad3f03fd9013a9d15005056825665'
{ "mensagem": "Boleto pago com sucesso." }- The boleto is settled (state 6) on the day of the call, even with a future due date, for the amount due that day. The account is credited and the Cobrança URL receives the baixa operacional webhook.
- BB documents
GET; Mimicr acceptsGETandPOST, with no token and no body. Other methods answer404 Api not found. - Wrong length:
4003295618"Número do Título Inválido". Boleto that doesn't exist:4044023795. Boleto already paid or written off:4004007954.
See Pay a boleto (simulator). To pay at another bank, through the boleto's Pix or with a partial amount, use the boleto.pay action.
BB's homologação sends no webhook for payments made by the simulators. Mimicr does, so you can test receiving them. To mirror BB, turn on noWebhooksOnSimulatedPayments (below). Control API actions always send the webhook.
Test data
| API | Data | Value |
|---|---|---|
| Pix | Test receiver keys | hmtestes2@bb.com.br, 9e881f18-cc66-4fc7-8f2c-a795dbb2bfc1, +5511985732102, 95127446000198 |
| Pix | Simulator payer | VICTOR LOPES DORNELES, CPF 93492239293 |
| Cobranças | Convênio, carteira and variação | 3128557, 17, 35 |
| Cobranças | Agência and conta | 452, 123873 |
| Pagamentos em Lote | Contract, debit agência and conta | 731030, 1607, 99738672-X |
| Extratos | Agência and conta | 551/5087, 1505/1348, 452/123873 |
Mimicr accepts this data as your sandbox's own, besides the sandbox's own data (GET /v1/bb). In the Cobranças API, BB lists a few fictitious payers; Mimicr accepts any CPF or CNPJ with valid check digits and rejects invalid ones with 4500431 (CPF) or 4500947 (CNPJ). Each sandbox has its own base: nosso números other people used in BB's homologação don't collide with yours.
Values that force outcomes
BB documents no test triggers. These rules are Mimicr's own:
| Where | Value or situation | Outcome |
|---|---|---|
| Pagamentos em Lote | Cents .91 (e.g. 100.91) | Entry REJEITADO |
| Pagamentos em Lote | Cents .92 | PAGO and, ~3 s later, DEVOLVIDO by the receiver (the amount returns to the account) |
| Pagamentos em Lote | Cents .93 | BLOQUEADO (reason 269, insufficient balance) |
| Pagamentos em Lote | Balance lower than the payment | BLOQUEADO |
| Pix | Refund larger than the account balance | NAO_REALIZADO, "Saldo insuficiente para realizar a devolução." |
| All | Chaos on | Errors, latency and operation and webhook failures (see Sandbox control) |
Sandbox switches
All off by default. Change them in the console or through the control API:
curl --request PUT \
--url https://api.mimicr.dev/v1/bb/homolog \
--header 'Authorization: Bearer mk_...' \
--header 'Content-Type: application/json' \
--data '{ "autoRelease": true, "tokenRateLimit": true }'| Switch | When on |
|---|---|
noWebhooksOnSimulatedPayments | Payments through BB's simulators generate no webhook, as in the real homologação |
autoRelease | Batches are released on their own once validated, with no POST /liberar-pagamentos |
tokenRateLimit | At most 10 tokens every 10 minutes; the 11th gets 429 |
The "Trava de 30 minutos" (boletoLock, in the console or with PUT /v1/bb/homolog): as at BB, a boleto can only be updated or written off 30 minutes after registration or the last change; before that, 400 4923876 "Inconsistência Boleto em processamento". Use the sandbox clock to get past the lock.