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

# Draft invoice

> Review, refresh, finalize or delete an invoice before the grace period ends.

A draft invoice lets you review fees before the invoice is finalized. The [grace period](https://getlago.com/docs/v2/guide/invoicing/invoicing-settings/grace-period.md) sets how long it stays in draft. During this time, you can refresh its amounts, finalize it early or delete it if it was created by mistake.

## Refresh a draft invoice

Refresh a draft to recalculate its fees, taxes and total.

### Add late usage to a draft

If usage is missing, send [events](https://getlago.com/docs/v2/guide/events/ingesting-usage.md) with `external_contract_id` and a `timestamp` within the invoice’s billing period before refreshing it.

For example, an invoice covers January 1 to January 31, 2027, with a three-day grace period. On February 2, you send an event for `contract_example` dated January 11. Refresh the draft to include that usage.

> [tab] Dashboard
>
> 1. Open the draft invoice.
> 2. Click **Refresh**.

> [tab] API
>
> ```bash Refresh a draft invoice theme={"dark"}
> LAGO_URL="https://api.getlago.com"
> API_KEY="__YOUR_API_KEY__"
> INVOICE_ID="__YOUR_INVOICE_ID__"
>
> curl --location --request PUT "$LAGO_URL/api/v2/invoices/$INVOICE_ID/refresh" \
>   --header "Authorization: Bearer $API_KEY"
> ```
>
> > [accordion] Response details
> >
> > Eligible non-draft invoices return `200` unchanged. See the [Refresh API reference](https://getlago.com/docs/v2/api-reference/invoices/refresh.md) for response details.

## Finalize a draft invoice

Finalize a draft when you have finished reviewing it and want to bill before the grace period ends. Lago refreshes the invoice before finalizing it.

> [!WARNING]
>
> Finalization cannot be undone. To cancel a finalized invoice, see [Void invoice](https://getlago.com/docs/v2/guide/invoicing/void.md).

> [tab] Dashboard
>
> 1. Open the draft invoice.
> 2. Click **Finalize**.
> 3. Confirm finalization.

> [tab] API
>
> ```bash Finalize a draft invoice theme={"dark"}
> LAGO_URL="https://api.getlago.com"
> API_KEY="__YOUR_API_KEY__"
> INVOICE_ID="__YOUR_INVOICE_ID__"
>
> curl --location --request PUT "$LAGO_URL/api/v2/invoices/$INVOICE_ID/finalize" \
>   --header "Authorization: Bearer $API_KEY"
> ```
>
> A successful request returns `200` with the invoice. If Lago needs to fetch taxes from a tax provider, the invoice can remain in `pending` status until those taxes are applied. Check the returned status before treating the invoice as finalized.
>
> See the [Finalize API reference](https://getlago.com/docs/v2/api-reference/invoices/finalize.md) for error responses.

## Delete a draft invoice

Delete a draft invoice if it was created by mistake. Only drafts that have not been synchronized to an external integration can be deleted.

> [!WARNING]
>
> Deletion cannot be undone. If only the amounts are incorrect, correct the underlying data and refresh the draft instead.

> [tab] Dashboard
>
> 1. Open the draft invoice.
> 2. Click the **ellipsis icon**.
> 3. Select **Delete invoice**.
> 4. Confirm deletion.

> [tab] API
>
> ```bash Delete a draft invoice theme={"dark"}
> LAGO_URL="https://api.getlago.com"
> API_KEY="__YOUR_API_KEY__"
> INVOICE_ID="__YOUR_INVOICE_ID__"
>
> curl --location --request DELETE "$LAGO_URL/api/v2/invoices/$INVOICE_ID" \
>   --header "Authorization: Bearer $API_KEY"
> ```
>
> The response returns the invoice with `status: "deleted"`.

To cancel a finalized invoice while keeping it on record, see [Void invoice](https://getlago.com/docs/v2/guide/invoicing/void.md).

## Next steps

> [card] [Grace period](https://getlago.com/docs/v2/guide/invoicing/invoicing-settings/grace-period.md)
>
> Set how long invoices stay in draft.

> [card] [Void invoice](https://getlago.com/docs/v2/guide/invoicing/void.md)
>
> Cancel a finalized invoice.

> [card] [Finalize an invoice (API)](https://getlago.com/docs/v2/api-reference/invoices/finalize.md)
>
> Request and response schema.

> [card] [Refresh an invoice (API)](https://getlago.com/docs/v2/api-reference/invoices/refresh.md)
>
> Request and response schema.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.