Finalize a customer invoice

Turn a draft invoice into a final one with an invoice number.

POST https://cotlet.dev/api/v1/pennylane/invoices/{invoice_id}/customer-invoice/finalize

write Confirm

Finalizes a draft invoice and returns its invoice number. Once finalized, the invoice can no longer be edited. The call fails with an error when the entry lines are not balanced, and it does not send the invoice to the customer; use send_customer_invoice for that. Finalizing issues a legal document, so it asks for your OK. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: finalize_customer_invoice
NameTypeDescription
invoice_id integer required integer Invoice ID from list_customer_invoices or create_customer_invoice.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/pennylane/invoices/1/customer-invoice/finalize \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("pennylane", "finalize_customer_invoice", {"invoice_id":1})
Node.js
const result = await cotlet.call('pennylane', 'finalize_customer_invoice', {"invoice_id":1});
CLI
cotlet call pennylane finalize_customer_invoice --data '{"invoice_id":1}'

Example response

JSON

{
  "invoice_id": 118390,
  "invoice_number": "F-2026-0151",
  "status": "upcoming",
  "draft": false,
  "amount": "1368.00",
  "deadline": "2026-11-30"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.