Create invoice

Create a sales invoice for a customer with one or more lines.

MCP tool myob_write → create_invoice

write Confirm

Creates an open sales invoice and returns its number, tax, total and balance due. Layout service takes free-text lines, item takes item codes from your Items List and professional also records the dates the work was done. Due date follows the customer terms unless you pass due_date. The invoice is not emailed until you call send_invoice. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_invoice
NameTypeDescription
customer_id string required string Customer card ID from list_customers, e.g. CUS000012.
date date date Invoice date. Default: today.
due_date date date Due date. Default: from the customer payment terms.
layout enum enum service, item or professional. Default: service.
lines array required array Objects with description or item_code, quantity, unit_price and tax_code, e.g. GST.
tax_inclusive boolean boolean true if unit prices include tax. Default: false.
comment string string Text shown on the invoice.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "myob_write",
    "arguments": {
      "operation": "create_invoice",
      "arguments": {
        "customer_id": "CUS000012",
        "date": "2026-10-14",
        "layout": "service",
        "lines": [
          {
            "description": "Bookkeeping, October",
            "quantity": 1,
            "unit_price": 1000,
            "tax_code": "GST"
          }
        ]
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "invoice_number": "00000142",
    "customer_id": "CUS000012",
    "customer": "Harbour Cafe Pty Ltd",
    "status": "open",
    "date": "2026-10-14",
    "due_date": "2026-10-28",
    "subtotal": 1000,
    "tax": 100,
    "total": 1100,
    "balance_due": 1100
  },
  "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.