> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mitu.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mitu.ai/_mcp/server.

# Invoices

An invoice is a formal request for payment, with line items, tax, discounts, a due date and your own invoice number. It suits any sale where the customer expects a proper bill rather than a simple request for an amount, such as professional services, project milestones or business purchases. Like every [payment experience](/platform/payment-experiences/overview), an invoice can be paid by the customer directly or by an AI agent acting on their behalf, and both settle the same invoice.

Invoices are addressed to [recipients](/platform/payment-experiences/recipients), the people and businesses you bill. They can be created under **Invoices** in the [Mitu dashboard](https://app.mitu.ai), or through the API when your own billing system issues them.

## What invoices provide

1. **A complete billing record**\
   Each invoice carries its line items, subtotal, tax, discount and total, numbered in your own sequence or automatically.
2. **Delivery and reminders**\
   Mitu emails the invoice to the recipient with a link to pay, and you can send reminders until it is paid.
3. **A tracked lifecycle**\
   Each invoice moves from draft to sent, viewed, overdue and paid, so you always know where it stands.
4. **Billing on behalf of others**\
   An invoice can show another sender in place of your business, for platforms that bill on behalf of their own clients.

## Issuing an invoice

#### Create the invoice

Create the invoice with at least one line item, naming the recipient inline or referring to one you have already saved. In the dashboard, you can also choose a due date of seven, fourteen or thirty days and add a note to the recipient. Through the API, send an Idempotency-Key header so that a retried request never bills the same recipient twice.

```bash
curl --request POST \
  --url https://api.mitu.ai/v1/invoices \
  --header "x-api-key: $MITU_API_KEY" \
  --header "Idempotency-Key: invoice-INV-2026-441" \
  --header "Content-Type: application/json" \
  --data '{
    "recipient": { "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com" },
    "invoiceNumber": "INV-2026-441",
    "description": "Design services, September",
    "currency": "USD",
    "lineItems": [
      { "name": "Design retainer", "quantity": 1, "amount": 1200.00 },
      { "name": "Additional revisions", "description": "3 rounds", "quantity": 3, "amount": 150.00 }
    ],
    "taxAmount": 123.75,
    "dueAt": "2026-10-01T00:00:00Z"
  }'
```

| Parameter                        | Description                                                                                                                                                            |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `recipient`                      | The recipient, given inline with a `name` and an optional `email` and `phone`. If a saved recipient already has that email or phone, the invoice is addressed to them. |
| `recipientId`                    | The identifier of a saved recipient. Send this or `recipient`, never both.                                                                                             |
| `lineItems`                      | At least one item, each with a `name`, `quantity` and `amount`, and an optional `description`.                                                                         |
| `currency`                       | The currency of the invoice.                                                                                                                                           |
| `invoiceNumber`                  | Your own invoice number. When it is not set, invoices are numbered automatically in sequence.                                                                          |
| `sender`                         | Who the invoice is from, when you bill on behalf of another business. The recipient sees this in place of your business name.                                          |
| `description`                    | What the invoice is for.                                                                                                                                               |
| `taxAmount` and `discountAmount` | Added to and deducted from the total. Both default to zero.                                                                                                            |
| `dueAt`                          | When payment is due, as an ISO 8601 timestamp.                                                                                                                         |

The total is the sum of the line items, plus tax, minus any discount, and it must be greater than zero.

#### Review the draft

A new invoice starts as a draft, so nothing reaches the recipient until you are ready. While it is a draft, or after it has been sent, you can correct it, and the total is recalculated from its line items, tax and discount.

```http
PATCH /v1/invoices/{id}
```

#### Send it

Send the invoice when it is ready. Mitu emails it to the recipient with a link to pay, and you can send it again at any point before it is paid as a reminder.

```http
POST /v1/invoices/{id}/send
```

If the recipient has no email address, the invoice is made payable without being emailed, and you share its checkout link yourself.

#### Get it paid

Each invoice has its own links, returned in `url`. The recipient opens the checkout link and pays, while an AI agent acting for them pays through the agent link. Always use the links returned for the invoice rather than constructing them.

```json
"url": {
  "checkout": "https://mitu.ai/invoice/inv_4k2m9x7ptw3c",
  "agent": "https://agent.mitu.ai/invoice/inv_4k2m9x7ptw3c",
  "docs": "https://agent.mitu.ai/invoice/inv_4k2m9x7ptw3c/llms.txt"
}
```

#### Reconcile the payment

Each change in an invoice's status is reported through [events](/platform/webhooks/events). When it is paid, your systems receive notification that both the invoice and the payment are complete, each carrying your invoice number, so you can update your billing records and continue whatever the payment unlocks.

## Managing invoices

```http
GET    /v1/invoices?status=overdue&recipientId=rcp_ds9hazr8jd3l
GET    /v1/invoices/{id}
GET    /v1/invoices/{id}/views
DELETE /v1/invoices/{id}/cancel
```

Invoices can be listed and filtered by status, by recipient or by recipient reference. Each time an invoice is opened is recorded, so you can see when a recipient has viewed it. An invoice that is paid, or in the process of being paid, cannot be cancelled.

## Invoice states

| State       | Meaning                                       | Payable                                  |
| ----------- | --------------------------------------------- | ---------------------------------------- |
| `draft`     | Created but not yet sent, and still editable. | No                                       |
| `sent`      | Sent to the recipient, and still editable.    | Yes                                      |
| `viewed`    | The recipient has opened it.                  | Yes                                      |
| `overdue`   | The due date passed without payment.          | Yes. An overdue invoice remains payable. |
| `settling`  | A payment is being settled.                   | No                                       |
| `paid`      | Paid in full.                                 | No                                       |
| `cancelled` | You cancelled it.                             | No                                       |

## Invoicing practices

1. **Use your own invoice numbers**\
   If your accounting system already numbers invoices, pass that number, so the invoice in Mitu and the one in your books always match.
2. **Send reminders before the due date**\
   Send a reminder shortly before an invoice falls due. Overdue invoices remain payable, but earlier reminders shorten the time to payment.
3. **Reconcile from notifications**\
   Update your billing records from the notification that an invoice has been paid, never from what the recipient reports.

Invoices bring formal billing to every customer, whether they pay themselves or delegate payment to an agent. Each invoice remains a single, complete record from creation to payment, consistent with the books your business already keeps.