Skip to article
OpenCraft

Use cases

How to use an AI invoice generator without breaking the maths

An invoice is a payment request with arithmetic in it. Layout is the easy half. The half that gets you paid is a subtotal that equals the line items, a tax line you can defend, and a file you can re-run next month.

Try this exact task

“Here are August's hours and rates. Build the invoice for Northwind.”

The staged prompt makes OpenCraft ask for your invoice number, dates, tax treatment, and payment terms rather than inventing them, then build the totals as formulas instead of typed numbers. You review the prompt before sending it.

Bring
  • Your details and the customer's
  • Line items, quantities, unit prices
  • Tax treatment and payment terms
The prompt requests
  • Working .xlsx with live formulas
  • A checks sheet that must pass
  • Client-ready PDF from that file
Use the complete prompt
Build an invoice for me as a working spreadsheet plus a PDF. Ask me for my legal name and address, my tax or company registration numbers if I have them, the customer's name and billing address, any purchase-order reference, the invoice number and my numbering scheme, the invoice date and supply date, the payment due date, the currency, every line item with quantity and unit price, whether prices are tax-inclusive, the tax rate I have been told applies, any deposit or credit already paid, and my payment instructions. Do not guess the tax treatment or invent a registration number — ask me, and leave a clearly marked blank if I do not know. Build the subtotal, tax, total, and balance due as formulas rather than typed numbers. Add a Checks sheet with labelled reconciliation formulas that each evaluate to zero: line totals minus subtotal, rate times taxable base minus tax, subtotal plus tax minus total, and total minus deposits minus balance due. Then render the PDF from that same workbook and give me both files.

An AI invoice generator drafts the document. It does not decide your tax position.

Two jobs wearing one name

Search for an AI invoice generator and you get two different products wearing the same label. One makes a document: your details, the customer's details, line items, totals, a PDF. The other runs your billing: recurring charges, payment links, reminders when an invoice goes unpaid, sales-tax rates by address, and a ledger your accountant can read.

This page is about the first job, done properly. Making the document is worth automating when you invoice irregularly, when every job is priced differently, or when the invoice is really a small calculation — staged milestones, retainer drawdowns, rebilled costs, split rates across a month. That is the case where a template fights you and a full billing system is more setup than the work deserves.

The line you should not let a model cross

A language model will happily produce a confident-looking VAT number, a plausible tax rate, and a registration line that belongs to nobody. On an invoice, those are not cosmetic errors. They are the fields your customer's accounts-payable team checks and your tax authority cares about. Require the generator to ask rather than fill.

The fields an invoice generally needs — and the ones that vary

Start from your own tax authority

There is no single global invoice. In the UK, GOV.UK says every invoice must carry a unique identification number, your company name, address and contact information, the customer's company name and address, a clear description of what you are charging for, the supply date, the invoice date, the amounts charged, the VAT amount if applicable, and the total owed. A sole trader must also give their own name, any business name in use, and an address where legal documents can be delivered. A limited company must use the full company name as it appears on the certificate of incorporation — and if it names one director on the invoice, it must name all of them.

Across the EU, the European Commission sets out when an invoice is required at all and what a full VAT invoice must contain: date of issue, a unique sequential number, supplier and customer details, the customer's VAT identification number where the customer is liable for the tax, the description, quantity and unit price, the VAT rate and amount payable, and a breakdown by rate or exemption.

“A business must issue an invoice whenever goods or services are supplied to another business or a non-taxable legal entity.”

European Commission, VAT invoicing rules

The United States is different again. The IRS does not prescribe an invoice format; Publication 583 simply lists invoices among the supporting documents that evidence gross receipts, alongside cash register tapes, bank deposit slips and Forms 1099. State and local sales-tax rules can add their own requirements, so a US invoice is shaped more by your records and your state than by a federal template.

Fields most invoices carry, and which of them are jurisdiction-bound.
FieldWhat goes in itJurisdiction-dependent?
Invoice numberOne unique identifier, never reusedYes — whether it must be strictly sequential varies
Your identityLegal name, trading name, address for serviceYes — UK sole traders and companies have different rules
Customer identityName and billing address, plus PO referencePartly — a tax number may be required for B2B supplies
DatesInvoice date, supply date, due dateYes — supply date is required in the UK and EU
Line itemsDescription, quantity, unit price, line totalNo — but the level of detail is often contractual
Tax lineRate, taxable base, tax amount, breakdown by rateYes — the single most jurisdictional field on the page
Registration numbersVAT or tax number, company numberYes — required only if you hold them and rules say so
Total and balanceTotal owed, less deposits and creditsNo — but it must reconcile to the lines above it

One more moving part: electronic invoicing. The European Commission states that electronic invoices are equivalent to paper invoices and that public administrations must accept structured electronic invoices for business-to-government supplies. Several countries are separately phasing in structured e-invoicing mandates with their own formats and timetables. Whether one applies to you, and from when, is a question for your tax authority — not for a chat window.

Download the invoice input sheet

Why the arithmetic — not the layout — is the actual job

A pretty invoice with a wrong subtotal is worse than no invoice

Most invoice generators produce a picture of an invoice. The numbers are text the model wrote. If a line item changes, nothing recalculates, and a subtotal that is off by one rebilled expense survives into the PDF looking exactly as authoritative as a correct one. Your customer finds it, the invoice goes into a query queue, and you get paid weeks later.

What OpenCraft actually does here

OpenCraft does not have an invoice template. It has a sandbox. When you ask for a spreadsheet, the agent writes a real Python program usingopenpyxl and runs it in a per-conversation Linux sandbox, producing a genuine .xlsx in which the subtotal, tax, total and balance are live formulas over the line-item rows — not numbers a model typed.

Before that file is ever published to you, the host copies it out and recalculates it with headless LibreOffice, so the cached results in the workbook are what a spreadsheet application actually computes rather than what the generating code believed. It then reads the recalculated package back and refuses it if any formula resolved to an error.

The part that matters most for invoicing is the checks sheet. A sheet named Checks (or QA, Validation, Reconciliation) is treated as executable. Every row must be a human-readable label next to a formula with a cached result, and each check must come back zero, or TRUE, or PASS. A check that evaluates to FALSE, to a non-zero number, or to a formula error fails the whole job — and the failing cell reference and the check's own label are handed back to the model to repair, rather than shown to you as a broken deliverable.

The PDF takes the same route. It is rendered from that exact workbook inside the sandbox, and the host rasterises its first page with Poppler to confirm it is a genuinely renderable file. Publication is transactional across everything that job produced: if the workbook fails validation or the PDF will not render, neither file is published. You do not receive a PDF whose spreadsheet disagreed with it.

A worked example, end to end

Four line items, a deposit, and one tax line

Say you are billing a design and build engagement. You supply the quantities, the unit prices, and — from your accountant, not from the model — a 20% rate that applies to the whole supply.

Line items, with every total in the right column expressed as a formula over quantity and unit price.
DescriptionQtyUnit priceLine total
Discovery workshop11,200.001,200.00
Design sprint (hours)1295.001,140.00
Front-end build (hours)3485.002,890.00
Stock photography, rebilled1240.00240.00

From lines to balance due

Subtotal =SUM(Items!D2:D5) gives 5,470.00. Tax =ROUND(Subtotal*Rate,2) at the 20% you supplied gives 1,094.00. Total =Subtotal+Tax gives 6,564.00. A 1,500.00 deposit already paid is deducted, so balance due =Total-Deposit is 5,064.00.

The Checks sheet then carries four labelled formulas, each of which must return zero: =ROUND(SUM(Items!D2:D5)-Subtotal,2), =ROUND(Subtotal*Rate-Tax,2), =ROUND(Subtotal+Tax-Total,2), and =ROUND(Total-Deposit-BalanceDue,2). Change a quantity and every one of them re-evaluates on the next run.

The PDF is then rendered from this workbook, so the number your customer reads comes from the same file the checks ran against — one source of arithmetic, not a second layout to reconcile. Glance at the returned preview before sending; the render is the one step the checks themselves do not inspect.

Nothing above tells you whether 20% was the right rate, whether the rebilled photography should sit inside the taxable base, or whether the deposit already carried tax when you took it. Those are your accountant's answers, and the invoice is only as sound as they are.

Numbering, dates, and terms: the boring fields that cause disputes

Pick a numbering scheme and never break it

The European Commission's VAT invoicing rules call for a unique sequential number identifying the invoice. GOV.UK asks UK businesses for a unique identification number and does not prescribe its structure. Whichever binds you, the practical rule is the same: one scheme, no reuse, no gaps you cannot explain — and confirm with your own tax authority whether strict sequence is required, because it is not a universal rule. If you cancel an invoice, issue a credit note against it rather than deleting the number.

Keep the two dates apart

The invoice date is when you issued it. The supply date is when the goods or service were provided, and both the UK and EU rules treat it as its own field. They are often different — work done in August, invoiced in September — and the difference can decide which tax period the supply lands in. Ask the generator for both, explicitly.

Write payment terms the invoice can act on

“Net 30” is a term, not a date. Put the actual due date on the invoice, computed from the invoice date, along with the payment method and the reference you want quoted. If your contract sets late-payment interest, state it. If it does not, do not let a model invent a penalty clause for you.

Use dedicated invoicing software when billing is a system, not a document

These are accounting jobs, not document-generation jobs

Be honest about the boundary. Generating a file does not manage a receivables process, and pretending otherwise costs you money. Reach for QuickBooks, Xero, FreshBooks, Wave, Stripe Invoicing, Zoho Books, or whatever your accountant already uses when you need any of the following.

  • Recurring billing. Retainers and subscriptions that issue themselves on a schedule, with proration when a plan changes mid-cycle.
  • Payment links and reconciliation. A pay button on the invoice, card and bank rails behind it, and the payment matched back to the invoice automatically.
  • Dunning. Automatic reminder sequences before and after the due date, ageing reports, and a view of who owes you what right now.
  • Sales-tax calculation. Rates resolved by customer address and product category, kept current as they change, with the liability tracked for filing.
  • Ledger sync and audit trail. Every invoice posted to your books, an immutable record of who changed what and when, and credit notes handled as first-class objects.
  • Structured e-invoicing. Where a mandate requires a specific machine-readable format and a network to transmit it, you need software certified for it, not a PDF.

The useful split is straightforward. If you send the same invoices to the same customers every month and need to chase payment, run invoicing software. If each invoice is a small bespoke calculation and the volume is low, a generated workbook plus a PDF is faster and leaves you with a file you can inspect. Plenty of businesses do both: software for the recurring base, a built file for the awkward one-off.

And get a professional to check the tax

No AI invoice generator is a competent authority on your tax position. Registration thresholds, exemptions, cross-border rules, and e-invoicing mandates change, and they differ by country and often by state. Use an accountant or your tax authority for the answer, then use the generator to apply it consistently. Compare that with other AI tools that produce files, or browse the rest of the OpenCraft use-case library.

Sources

  1. Invoicing and taking payment from customers: what invoices must include GOV.UK
  2. VAT invoicing rules European Commission, Taxation and Customs Union
  3. Publication 583: Starting a Business and Keeping Records Internal Revenue Service
  4. Sole proprietorships Internal Revenue Service

Frequently asked questions

What has to be on an invoice?

It depends on where you are. GOV.UK tells UK businesses that every invoice needs a unique identification number, your name and address, the customer's name and address, a clear description of what you are charging for, the supply date, the invoice date, the amounts charged, the VAT amount if applicable, and the total owed. The European Commission's VAT invoicing rules require a date of issue, a unique sequential number, supplier and customer details, quantity and description, the VAT rate and amount, and a breakdown by rate or exemption. Check your own tax authority for the list that binds you.

Can I invoice without a company?

Often yes, but the answer is jurisdictional. The IRS defines a sole proprietor as someone who owns an unincorporated business by themselves, and such a person invoices under their own name and reports the income on their return. Other countries and many US states and cities add registration, licensing, or tax-registration steps. Confirm your own position before you rely on it.

What is the difference between an invoice and a receipt?

An invoice requests payment and states what is owed, for what, and by when. A receipt acknowledges that payment was made. The same job usually produces both, at different moments, and they are not interchangeable when someone asks you for proof of payment.

Can an AI invoice generator calculate tax for me?

It can apply a rate you supply and show the formula. It should not decide whether tax applies, which rate applies, or whether a supply is exempt, zero-rated, or subject to a reverse charge. Those turn on your registration status, your customer's status, and where the supply happens. Get that answer from your tax authority, an accountant, or sales-tax software, then hand the generator the rate.

Do invoice numbers have to be sequential?

It varies. The European Commission's VAT invoicing rules call for a unique sequential number identifying the invoice. GOV.UK asks UK businesses only for a unique identification number, without prescribing how it is structured. Pick one scheme, never reuse a number, and check with your own tax authority whether strict sequence is required of you.

Can I edit an AI-generated invoice later?

Only if the tool gives you the working file rather than a flattened image. Ask for a spreadsheet whose totals are formulas, plus a PDF rendered from that same file. Next month you change the line items and re-run it, instead of retyping an invoice and hoping the total still matches.

OpenCraft

Generate your invoice

The staged prompt collects your details, the customer's, the line items, the tax treatment you supply, and the payment terms — then builds the totals as formulas and renders the PDF from that workbook.