> ## 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.

# Invoice numbering

> Choose an invoice numbering sequence and prefix for each billing entity.

Choose how Lago numbers finalized invoices: use a separate sequence for each customer or one sequence for the billing entity. You can also add a prefix to the document number.

## Settings

| Field | Values | Effect |
| - | - | - |
| `document_numbering` | `per_customer` | One sequence per customer. |
| | `per_billing_entity` | One continuous sequence across all customers of the billing entity. |
| `document_number_prefix` | string or `null` | Prefix applied to document numbers. |

## Configure numbering

> [tab] Dashboard
>
> 1. Click **Settings** in the side menu.
> 2. Open **Billing entity**.
> 3. Open **Invoicing settings**.
> 4. Edit the **Document numbering** block.
> 5. Edit the **Document prefix** block.
> 6. Save your changes.

> [tab] API
>
> ```bash Use one sequence per billing entity theme={"dark"}
> LAGO_URL="https://api.getlago.com"
> API_KEY="__YOUR_API_KEY__"
> BILLING_ENTITY_CODE="acme_corp"
>
> curl --location --request PUT "$LAGO_URL/api/v2/billing_entities/$BILLING_ENTITY_CODE" \
>   --header "Authorization: Bearer $API_KEY" \
>   --header 'Content-Type: application/json' \
>   --data-raw '{
>     "billing_entity": {
>       "document_numbering": "per_billing_entity",
>       "document_number_prefix": "ACM"
>     }
>   }'
> ```

## Next steps

> [card] [Invoicing settings](https://getlago.com/docs/v2/guide/invoicing/invoicing-settings/overview.md)
>
> All invoicing settings and where they live.

> [card] [Billing entities](https://getlago.com/docs/v2/guide/billing-entities.md)
>
> Manage the entities that issue invoices.

> [card] [Update a billing entity (API)](https://getlago.com/docs/v2/api-reference/billing-entities/update.md)
>
> Request and response schema.

> [card] [Invoices](https://getlago.com/docs/v2/guide/invoicing/overview.md)
>
> Invoice statuses and actions.


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