Invoicing is a paid feature. If your plan does not include it, every endpoint
below returns
403. Any member of a company that has the feature can use these
endpoints; there is no separate invoicing permission.Authentication
Use a personal access token with the Invoicing capability (invoicing), or a full-access token. A token limited
to other capabilities receives
403 This token does not carry the 'invoicing' capability.
GET /invoicing/settings,
PUT /invoicing/settings, or the dashboard). If you invoice from two legal
entities, use two companies with one token each.
The document lifecycle
Creating a document does not produce an invoice anyone can pay. There are three distinct calls, and the third is optional when you deliver the invoice yourself.1
Create a draft
POST /invoicing/documents returns a draft with an id. It has no number,
no PDF and no XML, and you can still change everything on it with
PATCH /invoicing/documents/{id}.2
Finalize it
POST /invoicing/documents/{id}/finalize validates the document, allocates
the next number from your number range, freezes the EN 16931 record,
renders the PDF and the XML, packages and validates them, and stores both.
The call is synchronous. The response is the finished document. After this
the document is immutable; corrections go through a credit note or a
cancellation, which is what the law expects.3
Deliver it
Either fetch the files and send them yourself
(
GET /invoicing/documents/{id}/download/pdf and /download/xml), or let
meetergo email them with POST /invoicing/documents/{id}/send.1. Create a draft
Onlybuyer.name is strictly required to create a draft. Finalizing needs more:
at least one line item, and a Steuernummer or USt-IdNr on your invoicing
settings. Send everything you know at creation time; a draft can be patched,
but the fewer round trips the better.
id, status: "draft", number: null, the
lines with their id, position and computed netAmount, and the totals
netTotal, taxTotal, grossTotal. Totals are recomputed on every save and
again at finalization; never send them.
2. Finalize
Finalization is all or nothing. The number is allocated only after the
document passes the built-in checks, so a rejected document never burns a
number. Order of events:
- Emittability check (mandatory fields, tax rules). Fails with
422. - Number allocation from the range for the document’s kind and year.
- EN 16931 snapshot frozen, XML and PDF rendered.
- External validation and packaging. Fails with
400; if the validation service is down the call fails with503and the document stays a draft. - PDF and XML stored,
statusbecomesfinalized.
snapshot is the frozen EN 16931 record the XML and the PDF were rendered
from, as JSON. If you mirror invoices into your own database, store this
object: it is the complete, immutable content of the document, including the
seller block resolved from settings at the time of issue.
3. Fetch the files
type is pdf or xml. The URL is a short-lived signed link: download it
right away and keep the bytes, not the URL. On a draft the endpoint returns
404 Document has no generated file yet. For a rendering of a draft before
finalization, GET /invoicing/documents/{id}/preview returns
{ "pdf": "<base64>" } with a placeholder number.
Or let meetergo send it
POST /invoicing/documents/{id}/send emails the PDF and XML to buyer.email
(override with to), with the hosted payment link when a payment provider is
connected and includePaymentLink is not false. status becomes sent.
Reading documents back
There are no webhooks for invoicing documents yet. Poll the list endpoint with
status filters, or read events for a document you hold.
Document kinds and statuses
Rendering
The PDF follows DIN 5008 and is rendered by meetergo from the same snapshot as the XML. Layout, accent colour and logo are company settings (layout,
logoFileAssetId); the document language (de or en) picks the wording.
There is no way to supply your own PDF; the hybrid must be built from the
structured data so the visual and the XML cannot disagree.
Planned: a per-document letterhead choice, for sellers who print the same
layout with different logos (for example one logo per country the buyer is
in). Until it ships, one logo per company.
Tax treatment
SettaxTreatment on the document when the default German standard rate does
not apply. Anything except standard and oss forces the matching EN 16931
category and its exemption wording onto every line.
The exemption text printed for
E, AE, K, G and O defaults to the
German statutory wording and can be replaced per category in
PUT /invoicing/settings (taxExemptionNotes).
Errors you will meet
invoiceProblems[].scope says where to fix it: settings (seller side) or
document. Codes: missingInvoiceNumber, invalidIssueDate,
missingSellerName, missingSellerTaxId, missingSellerAddress,
missingBuyerName, missingLines, missingExemptionReason, and for
XRechnung missingBuyerReference, missingSellerContact,
missingPaymentMeans, missingSellerElectronicAddress,
missingBuyerElectronicAddress.
Getting paid
Two paths, and most businesses use both. Hosted payment page.GET /invoicing/documents/{id}/payment-link returns the
public URL of the invoice. Every finalized invoice has one; a draft has none
yet, and the endpoint returns { "url": null } until you finalize it. The page
offers card, PayPal and Mollie only for the providers you have connected; the
payment is recorded against the invoice automatically through the provider’s
webhook.
Bank transfer and cash. Record these yourself:
method accepts bank_transfer, cash or other. paidAt lets you backdate to
the Wertstellung. The invoice’s amountPaid, paidAt and status are derived
from the payments on it, so a partial amount produces partially_paid. A payment
recorded by mistake is removed with DELETE .../payments/{paymentId}.
Mahnwesen
Configure reminder levels once, inPUT /invoicing/settings:
autoSend on, meetergo sends the next due reminder on weekday mornings.
Levels never skip: the first counts from the due date, later ones from the last
reminder. Each reminder is its own PDF on your letterhead with the original
invoice attached; the invoice document itself is never altered. If your own
system owns collections, leave autoSend off and POST /invoicing/documents/{id}/dunning-pause
for invoices you handle elsewhere.
Linking a document to the rest of meetergo
GET /invoicing/buyer-prefill/company/{crmCompanyId} builds a buyer block from
a CRM company you already have, so you do not have to reassemble the address.
Products, recurring invoices and export
Related
- E-invoice fields
- Contacts
- CRM deal to invoice
- Every request and response schema: API Reference → Invoicing