What you can do
- Issue boletos with due dates, recorded against your Midaz ledger. Through the API, a boleto can also carry fines, interest, and discounts, and you can choose its nosso número.
- Pay bills (DARF tax payments and utility/concessionaire bills) directly from the Console.
- Consult a bill by its digitable line through the API before you pay it. The answer shows the amount, the dates, and who receives the money.
- Track operations from a dashboard with KPI cards, recent activity, and quick actions.
How a bill payment moves money
- The ledger reserves the amount in the funding account. If the balance or the overdraft limit does not allow it, the payment fails here, and BTG does not receive it.
- Payments sends the payment to BTG.
- When BTG accepts the payment, the API answers
201and the payment isCREATED. When the outcome at BTG is unknown, the API answers202and the payment isUNCONFIRMED. Its funds stay reserved. - For a bank slip or utility payment, the reconciliation reads the payment from BTG. If BTG has no record of it for the whole window that the deployment sets, the payment fails with
PBP-0211, and Payments releases the funds. - For a DARF payment, the funds stay reserved until the outcome from BTG arrives.
Find a payment after an error
A request to create a payment can end without a payment id, for example after a timeout or an answer with status
5xx. First send the request again under the same Idempotency-Key. After a 409 with PBP-0007 or a 503 with PBP-0008, wait, then send it again under the same key. After the same key returns another answer, call GET /v1/payments with idempotencyKey set to that key to find what the request created. Send the same X-Organization-Id as that request.
After you send a request again under a new Idempotency-Key, do not send it under the old key again. The old key can run the request again, and the two requests can both pay.
Where to start
Payments in Lerian Console
Activate the Payments plugin and take a first tour of the module.
Payments Overview
The dashboard: KPI cards, recent operations, and shortcuts.
Boletos
Issue, consult, and manage boletos.
Bill Payments
Pay DARF and utility bills from the Console.

