> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Bill Payments

> Pay DARF tax forms and bills (boletos, utilities) from the Payments plugin for Midaz, track payment states, and handle errors.

The **Bill Payments** page lets you pay bills directly from the Console, including **DARF** tax forms and **bills** such as boletos and utility slips. In this section, you'll learn how to submit a payment via the [Lerian Console](/en/lerian-console/about-lerian-console), which fields are required, the states a payment can move through, and how to handle errors.

## Accessing the Bill Payments page

***

To open the **Bill Payments** page, click **Payments** → **Bill Payments** from the left-side menu.

The page displays all bill payments for the organization in a data table. Use the **Filters** section to refine the payments shown.

From the top-right of the page, two buttons are available:

* **Pay bill** — pay a bill using a digitable line or barcode.
* **Pay DARF** — pay a DARF tax form by entering the tax details manually.

## Paying a bill

***

<Steps>
  <Step>
    From the **Bill Payments** page, click **Pay bill**.
  </Step>

  <Step>
    The **New payment** panel opens on the right. Make sure the **Pay bill** tab is selected.
  </Step>

  <Step>
    Fill in the fields:

    * **Digitable line or barcode** *(required)* — the full digitable line or barcode from the bill.
    * **Source account ID** *(required)* — the Midaz account to debit for this payment.
    * **Scheduled date** *(optional)* — schedule the payment for a future date. Leave blank to process immediately.
    * **Description** *(optional)* — an internal note for this payment.
  </Step>

  <Step>
    Click **Pay bill**.
  </Step>
</Steps>

## Paying a DARF

***

<Steps>
  <Step>
    From the **Bill Payments** page, click **Pay DARF**.
  </Step>

  <Step>
    The **New payment** panel opens with the **Pay DARF** tab active.
  </Step>

  <Step>
    Fill in the fields:

    **Taxpayer**

    * **Person type** *(required)* — **Individual (PF)** or **Company (PJ)**. This selection changes the document field below.
    * **CPF** *(required, when Individual)* — the taxpayer's CPF (`000.000.000-00`).
    * **CNPJ** *(required, when Company)* — the company's CNPJ (`00.000.000/0000-00`).
    * **Taxpayer full name** *(required)* — the taxpayer's full name.

    **DARF details**

    * **Treasury revenue code** *(required)* — the 4-digit revenue code (e.g., `0190`).
    * **DARF type** *(required)* — the type of DARF document.
    * **Reference date** *(required)* — the competency/reference date for the tax.
    * **Due date** *(optional)* — the due date for the payment.

    **Amounts**

    * **Principal amount** *(required)* — the main tax value (R\$).
    * **Interest** *(required)* — interest amount due (R\$). Enter `0,00` if none.
    * **Fine** *(required)* — fine amount due (R\$). Enter `0,00` if none.

    The **Total amount** summary updates automatically as you fill in the amount fields.

    **Payment**

    * **Source account ID** *(required)* — the Midaz account to debit.
    * **Reference number** *(optional)* — an internal reference for this DARF payment.
  </Step>

  <Step>
    Click **Pay DARF**.
  </Step>
</Steps>

## Payment states

***

A bill payment moves through the following states:

* **Pending** — the payment was submitted and is awaiting processing.
* **Scheduled** — the payment is scheduled for a future date.
* **Processing** — the payment is being processed by the provider.
* **Paid** — the payment was completed successfully.
* **Failed** — the payment could not be completed (see [Error handling](#error-handling)).
* **Cancelled** — the payment was cancelled before processing.

## Error handling

***

If a payment fails, it appears with a **Failed** status and an error reason in the details panel. Common causes include:

* **Invalid digitable line** — the line is malformed or the bill has expired. Check the bill and retry.
* **Invalid DARF details** — incorrect revenue code, CPF/CNPJ, or amounts. Correct the fields and retry.
* **Insufficient funds** — the source account does not have enough balance. Top up the account and retry.
* **Provider error** — the payment provider rejected the request. Retry or contact support.

<Warning>
  Bill payments require the appropriate Payments permissions. If you can't see the **Pay bill** or **Pay DARF** buttons, check your role permissions with your administrator.
</Warning>

## Related pages

***

<Columns cols={2}>
  <Card title="Payments introduction" icon="money-bill-wave" horizontal href="/en/lerian-console/midaz-console/payments-introduction" />

  <Card title="Boletos" icon="file-invoice" horizontal href="/en/lerian-console/midaz-console/payments-boletos" />
</Columns>
