Billing
Manager › Billing › Company holds what every invoice says about the seller. Invoices already issued keep what they were issued with.
The seller’s country
The country picks which details the form asks for and what the invoice footer starts from:
| Country | Details | Footer by default |
|---|---|---|
| Sweden | Org.nr, Momsreg.nr, säte | Org.nr, Momsreg.nr, Styrelsens säte, Godkänd för F-skatt |
| Norway | Org.nr, MVA-nr | Org.nr, Foretaksregisteret |
| Denmark | CVR-nr., Momsnr. | CVR-nr., Momsnr. |
| Finland | Y-tunnus, ALV-nro, kotipaikka | Y-tunnus, ALV-nro, Kotipaikka |
| Germany | Handelsregister, USt-IdNr., Registergericht, Geschäftsführer | all four |
| Any other | Company reg. no., VAT no. | both |
Change the country and save: the form then shows that country’s details, and the footer goes back to that country’s default. The register number and the VAT number are always printed under the seller’s name; the other details only where the footer names them.
The sets are data in billing’s settings (sellerCountries): a country can be added or changed
there without a new release.
The invoice footer
The footer is printed at the foot of every invoice, in up to four columns. Each line is free
text; a word in braces is filled in from the company’s details when the invoice is made:
{name}, {address}, {postcode}, {city}, {email}, and the country’s details
({orgNumber}, {vatNumber}, {seat} and so on). A line whose braces are all empty is left
out, so “Styrelsens säte: {seat}” disappears while no seat is filled in.
Add bank details or any other statement you need as a line. Use the default puts the country’s footer back.
Preview an invoice shows an example invoice with today’s details and footer. It is never numbered and has no PDF.
Swedish invoices
A Swedish seller’s invoices keep the rules of the Swedish VAT Act: VAT per rate, the unit price excluding VAT, the reverse-charge wording, the VAT in kronor on an invoice in another currency, and an OCR reference for bank transfers. “Godkänd för F-skatt” is a footer line: remove it only if the company is not approved for F-tax.
Resellers are sellers too
A reseller organisation bills its own customers as a seller of its own: its own company details and footer, its own VAT home, number series, payment gateways, products and dunning. Its customers’ invoices name the reseller, never the realm. The reseller fills in the same form on its organisation’s page.
Invoices by e-mail
An invoice sent by e-mail uses the mail templates billing.invoice and billing.credit, which
you can change in Manager › Email templates (Realm mail and mail templates).
A reseller’s own text reaches its own customers.
Payments confirmed by the gateway
Billing asks each open payment’s gateway for its state on a schedule. A gateway that sends webhooks, such as Stripe, also tells billing at once about what happens later: a refund made in its dashboard, a dispute and how it ended, a saved card removed. Each event is booked once, whichever arrives first.
To turn it on for Stripe, add a webhook endpoint in Stripe’s dashboard at
https://<realm>/billing/hooks/realm/<gateway>, where <gateway> is the id of your Stripe
gateway in billing (a reseller’s: /billing/hooks/org:<id>/<gateway>). Paste Stripe’s signing
secret into the gateway’s Webhook signing secret (whsec_…). It is sealed and never shown again. A request
whose signature doesn’t verify, or that is more than five minutes old, is refused. The largest
body and the requests per address per minute are the policy billing.webhooks in
Policies.