Create invoice

Issue an invoice and book the income. It is created, not sent.

MCP tool fiken_write → create_invoice

write Confirm

Creates the invoice, like Opprett faktura in Fiken, from lines or from a draft_id, and registers the income in the accounts. It returns the invoice number and totals; the customer gets nothing until send_invoice runs. Fiken has no delete for invoices: a wrong invoice is corrected with a credit note in Fiken. Pass draft_id to issue a draft, or customer_id, days_until_due and lines to create one directly. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_invoice
NameTypeDescription
draft_id integer integer Draft ID from create_invoice_draft. Use this or the fields below.
customer_id integer integer Contact ID. Required without draft_id.
issue_date date date Invoice date. Default: today.
days_until_due integer integer Days from the invoice date to the due date. Required without draft_id.
lines array array Required without draft_id. Objects with description, quantity, unit_price (net per unit, excluding VAT), vat_type (for example HIGH, MEDIUM, LOW or NONE), optional discount_percent and income_account.
invoice_text string string Comment printed above the invoice lines.
your_reference string string Your reference, printed on the invoice.
currency string string ISO 4217 code. Default: NOK.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "fiken_write",
    "arguments": {
      "operation": "create_invoice",
      "arguments": {
        "customer_id": 4021188,
        "issue_date": "2026-10-14",
        "days_until_due": 14,
        "lines": [
          {
            "description": "Consulting, October",
            "quantity": 10,
            "unit_price": 1200,
            "vat_type": "HIGH"
          }
        ]
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "invoice_id": 5120331,
    "invoice_number": 10042,
    "customer_id": 4021188,
    "customer": "Nordlys Design AS",
    "issue_date": "2026-10-14",
    "due_date": "2026-10-28",
    "net": 12000,
    "vat": 3000,
    "gross": 15000,
    "currency": "NOK",
    "sent": false
  },
  "isError": false
}

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.