Guides
Introduction
What the Banco do Brasil simulator covers, how to swap BB's hosts for Mimicr's and where to start.
The Banco do Brasil simulator answers BB's APIs with the same paths, bodies, status codes and error formats as BB's homologação environment. You swap the host in your application, use your sandbox credentials and the rest of your code stays the same.
What is simulated
| API | Prefix | What it covers |
|---|---|---|
| OAuth | /oauth/token | client_credentials with Basic auth, mandatory scope and opaque 600 s tokens |
| API Pix v2 | /pix/v2 | cob, cobv, cobv batches, locations, received Pix, refunds (devoluções), per-key webhook and the pix-bb queries |
| API Cobranças v2 | /cobrancas/v2 | Registering, querying, updating and writing off boletos, boleto with Pix, baixa operacional and retorno de movimento |
| Pagamentos em Lote v1 | /pagamentos-lote/v1 | Batches of transfers, Pix, boletos, barcode slips, GRU, DARF and GPS; release, cancellation and queries |
| Extratos | /extratos/v1 and /extratos/v2 | Current account statement, built from what happens in the sandbox |
| Homologação simulators | /testes-portal-desenvolvedor/v1 | Paying a Pix QR Code or a boleto, as in BB's portal |
Webhooks are sent too: Pix (POST {webhookUrl}/pix), Cobrança baixa operacional and Lote payments.
Swap the hosts
| At BB (homologação) | At Mimicr |
|---|---|
https://oauth.hm.bb.com.br | https://oauth.bb.mimicr.dev |
https://api-pix.hm.bb.com.br/pix/v2 | https://api-pix.bb.mimicr.dev/pix/v2 |
https://api.hm.bb.com.br | https://bb.mimicr.dev |
https://pagamentos-lote.mtls.api.hm.bb.com.br/v1 | https://pagamentos-lote.bb.mimicr.dev/v1 |
https://extratos.mtls.api.hm.bb.com.br/v2 | https://extratos.bb.mimicr.dev/v2 |
All hosts lead to the same sandbox. https://bb.mimicr.dev alone serves everything with BB's prefixes (/oauth/token, /pix/v2, /cobrancas/v2, /pagamentos-lote/v1, /extratos/v1, /extratos/v2). On the dedicated pagamentos-lote. and extratos. hosts the path drops the API segment, as at BB. See Environment.
Every API call carries the app key in the query (?gw-dev-app-key=<app-key>) and a Bearer token. See Authentication.
What is not simulated
- Pix Automático (rec, solicrec, cobr, locrec): the scopes are accepted in the token, but the routes don't exist.
- mTLS: no client certificate is required, neither to call the APIs nor to receive webhooks.
- MED:
GET /pix/v2/pix-bb/contestacoesalways answers empty. - URL registration in BB's Portal: the Cobrança and Lote webhook URLs are set in the console or through the control API.
Where to go next
- Quickstart: token, Pix charge, payment and webhook in a few minutes.
- Homologação: payment simulators, convênio and test data.
- Pix: Immediate charge, Charge with due date, Received Pix and refunds.
- Cobranças: Register a boleto and Boleto with Pix.
- Pagamentos em Lote: Transfers and Pix and Release and queries.
- Extratos and Errors.
- Sandbox control: play the payer, the SPI and the bank.
In the reference, start with Get a token, Create an immediate charge, Register a boleto and Create a transfer batch.