API Reference
Get a DARF payment
/pagamentos-lote/v1/darf-preto/{id}https://bb.mimicr.dev · provider: https://api.hm.bb.com.brDetails a DARF payment by id.
OAuth scope: pagamentos-lote.pagamentos-info.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Path parameters
Payment id (17 digits).
90001210731030000Query parameters
Application key (developer_application_key) from the BB Developers Portal. Required on every call.
Debit agência. Optional.
Debit current account. Optional.
Check digit of the debit account. Optional.
Responses
200Success.
Payment id generated by BB: a 17-digit integer (from 90000000000000001 to 99999999999999999). Read it as int64 or string, never as a double.
Payment state: CONSISTENTE, INCONSISTENTE, PENDENTE (release pending), AGENDADO, AGUARDANDO DEBITO, DEBITADO, PAGO, REJEITADO, DEVOLVIDO (paid and refused by the receiver), CANCELADO or BLOQUEADO (debit not made, for example for lack of balance).
CONSISTENTEINCONSISTENTEPENDENTEAGENDADOAGUARDANDO DEBITODEBITADOPAGOREJEITADODEVOLVIDOCANCELADOBLOQUEADO"PAGO"Debit agência, 4 digits without the check digit.
1607Debit current account, without the check digit.
99738672Check digit of the debit account (1 character; may be X).
"X"Initial card number (always 0 in this API).
Final card number (always 0 in this API).
Date as ddmmaaaa, an integer without the day's leading zero (e.g. 9012026 = 09/01/2026).
Payment amount in reais.
Debit document number (shown on the debited account's statement).
Payment authentication code (16 hex characters); filled when the payment is PAGO.
"F033A03D67666112"DARF data.
Show child attributes
Tax revenue code.
Taxpayer type: 1 CNPJ, 2 CPF.
Taxpayer's CPF or CNPJ.
Tax identifier: 16 other revenues, 18 Simples.
Assessment period, ddmmaaaa.
Reference number.
Principal amount.
Fine amount.
Interest and charges amount.
Due date, ddmmaaaa.
Payment description.
Rejection or return occurrences of the payment.
Show child attributes
Rejection or return reason code.
403Refused by the gateway, as plain text: Authentication parameters missing (no gw-dev-app-key) or Authentication failed (invalid app key, or token missing, expired or without the operation's scope).
Authentication parameters missingAuthentication failed"Authentication failed"404Request or payment not found.
List of errors.
Show child attributes
Error code.
"2"Message version.
"1"Error description.
"Requisição 9999999 não encontrada para este contrato."Occurrence id (32 hex characters), for BB support.
"ad7661e506e077d533d3559c72a4ff34"500System error.
List of errors.
Show child attributes
Error code.
"2"Message version.
"1"Error description.
"Requisição 9999999 não encontrada para este contrato."Occurrence id (32 hex characters), for BB support.
"ad7661e506e077d533d3559c72a4ff34"