Skip to navigation

Invoices

Bill customers formally with itemised invoices and due dates that a person or an AI agent can pay.
View as Markdown

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, 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, the people and businesses you bill. They can be created under Invoices in the Mitu dashboard, 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

1

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.

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"
}'
ParameterDescription
recipientThe 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.
recipientIdThe identifier of a saved recipient. Send this or recipient, never both.
lineItemsAt least one item, each with a name, quantity and amount, and an optional description.
currencyThe currency of the invoice.
invoiceNumberYour own invoice number. When it is not set, invoices are numbered automatically in sequence.
senderWho the invoice is from, when you bill on behalf of another business. The recipient sees this in place of your business name.
descriptionWhat the invoice is for.
taxAmount and discountAmountAdded to and deducted from the total. Both default to zero.
dueAtWhen 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.

2

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.

PATCH /v1/invoices/{id}
3

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.

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.

4

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.

"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"
}
5

Reconcile the payment

Each change in an invoice’s status is reported through 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

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

StateMeaningPayable
draftCreated but not yet sent, and still editable.No
sentSent to the recipient, and still editable.Yes
viewedThe recipient has opened it.Yes
overdueThe due date passed without payment.Yes. An overdue invoice remains payable.
settlingA payment is being settled.No
paidPaid in full.No
cancelledYou 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.