Turn an invoice into a PDF
An invoice has to look exactly the same every time, whether it is the first one a customer gets or the fiftieth. Morfee turns the HTML design you already send by hand into a finished PDF with one customer's numbers in it, from a system that already has the data rather than someone opening a document each month.
The same shape as a quote, with three things added
Morfee does not have a separate "invoice mode." An invoice template is built exactly like a quote template: paste your HTML, point at the fields, save. There is a bundled quote example with the same number/customer/lines/totals shape most invoices start from; a real invoice usually adds:
- A due date, alongside the invoice date, and often a payment term ("net 14 days") derived from it.
- A payment reference or invoice number your bookkeeping matches the incoming payment against. Bind it the same way as any other field.
- Bank details, IBAN and a reference line, usually in the closing block rather than the table. Morfee does not process payments itself; the template only prints whatever payment details you put in the data.
Morfee does not send invoices, chase payment, or know whether one was paid. It renders the document; sending it and tracking it stays wherever that already happens.
Why the idempotency key matters more here
Retrying a render is normal: a flow times out, a step re-runs, a workflow tool retries a
failed HTTP call on its own. For a quote that just makes a second identical PDF. For an invoice a retry
that is not made safe can put the same invoice number in front of a customer twice, or worse, two
different invoice numbers for the same delivery. Send an Idempotency-Key that is unique to
this invoice and stable across retries:
POST /api/render?format=url
X-Api-Key: mrf_your_key_here
Content-Type: application/json
Idempotency-Key: invoice-2026-0149
{ "templateId": "invoice-b7e2f0", "data": { "number": "2026-0149", "customer": { "name": "..." } } }
Send the same key again for the same request and Morfee hands back the same PDF instead of rendering a second one. The mechanics are the same ones the Power Automate guide covers in more depth.
Questions people ask about invoices specifically
Does Morfee number my invoices?
No. The invoice number is a field like any other, coming from your own data. Wherever your numbering lives today, that stays the source of truth; Morfee only prints the number it is given.
Can the VAT be calculated instead of sent as a number?
Yes, with the math helper: one operation on one number, for example a 21% VAT line off a
subtotal. See the documentation for the exact syntax.
What about credit notes or corrections?
Build them as their own template. A credit note usually reads differently from an invoice, negative
amounts, a reference to the original, so it is its own HTML and its own templateId rather
than a flag on the invoice one.
See the whole API
This page covers one document type. The documentation covers everything Morfee does: templates, folders, versions, and the full set of error codes to branch on.