> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gobl.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Finland Finvoice 3.0

Key: `fi-finvoice-v3`

Module: [github.com/invopop/gobl.fi.finvoice](https://github.com/invopop/gobl.fi.finvoice)

Support for Finvoice 3.0, the Finnish electronic invoice format that
Finance Finland maintains and Finnish operators and banks exchange.
Finvoice conforms to the European Norm (EN) 16931, so this addon adds only
what the format needs on top of the EN 16931 rules: the e-invoice
addresses and operators that route the message, values that fit their
Finvoice elements whole, and the payment data for the EpiDetails payment
order, which every Finvoice invoice carries.

For more information on Finvoice, visit
[www.finanssiala.fi](https://www.finanssiala.fi/en/topics/finvoice-standard/).

## Extensions

### Finnish e-invoice operator

Identifier of the e-invoice operator (intermediator) that serves the
party's e-invoice address, quoted alongside that address: an operator's
own OVT code such as `003700010001`, or a bank's BIC such as `NDEAFIHH`.

A Finnish e-invoice address may be registered with several operators, and
the operator decides where an invoice is delivered. Set it on the party
that receives the message, the customer or the supplier of a self-billed
invoice, to have the Finvoice message routed to that operator:

```js theme={"system"}
"customer": {
	"name": "Ostaja Oy",
	"endpoints": [
		{ "uri": "iso6523-actorid-upis::0216:003745678907" }
	],
	"ext": {
		"fi-finvoice-operator": "003700010001"
	}
}
```

> [accordion] fi-finvoice-operator
>
> Pattern: `^[A-Za-z0-9]{2,35}$`

## Validation Rules

Validation rules check each struct against a set of assertions and report any
failures with a unique code and message.
[Read more about validation](https://docs.gobl.org/overview/validation.md).

> [accordion] bill.Invoice
>
> | Field | Test | Validation Code / Message |
> | - | - | - |
> | Invoice | <ul><li>Invoice number fits</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-23` Invoice number with its series must be at most 20 characters (Finvoice InvoiceNumber) |
> | Invoice | <ul><li>Whole amount</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-30` The due date must cover the whole amount (Finvoice EpiInstructedAmount) |
> | Invoice | <ul><li>One reason per category</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-31` One exemption reason per VAT category (Finvoice VatExemptionReasonCode, VatFreeText) |
> | Invoice | <ul><li>VAT percentages fit</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-37` VAT percentage must have at most 3 decimals (Finvoice RowVatRatePercent, VatRatePercent) |
> | Invoice | <ul><li>Quantities fit</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-32` Quantity must be at most 14 characters (Finvoice InvoicedQuantity) |
> | `supplier` | <ul><li>E-invoice address</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-13` Supplier needs an e-invoice address, an ISO 6523 endpoint or a coded inbox (Finvoice SellerOrganisationUnitNumber) |
> | `supplier` | <ul><li>E-invoice address fits</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-15` E-invoice address code must be 2 to 35 characters and its scheme at most 10 (Finvoice SellerOrganisationUnitNumber, FromIdentifier, ToIdentifier) |
> | `supplier.name` | <ul><li>Rune length at least 2</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-38` Supplier name must be at least 2 characters (Finvoice SellerOrganisationName) |
> | `supplier.identities[*].code` | <ul><li>Legal scope</li><li>Rune length at most 35</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-14` Legal identity code must be at most 35 characters (Finvoice SellerPartyIdentifier) |
> | `supplier.ext` | <ul><li>Ext 'fi-finvoice-operator' matches pattern `^[A-Za-z0-9]{2,35}$`</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-16` Supplier 'fi-finvoice-operator' extension must be 2 to 35 letters or digits |
> | `customer` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-01` Customer is required (Finvoice BuyerPartyDetails) |
> | `customer` | <ul><li>E-invoice address</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-17` Customer needs an e-invoice address, an ISO 6523 endpoint or a coded inbox (Finvoice BuyerOrganisationUnitNumber) |
> | `customer` | <ul><li>E-invoice address fits</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-19` E-invoice address code must be 2 to 35 characters and its scheme at most 10 (Finvoice BuyerOrganisationUnitNumber, FromIdentifier, ToIdentifier) |
> | `customer.name` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-02` Customer name is required (Finvoice BuyerOrganisationName) |
> | `customer.name` | <ul><li>Rune length at least 2</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-39` Customer name must be at least 2 characters (Finvoice BuyerOrganisationName) |
> | `customer.identities[*].code` | <ul><li>Legal scope</li><li>Rune length at most 35</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-18` Legal identity code must be at most 35 characters (Finvoice BuyerPartyIdentifier) |
> | `customer.ext` | <ul><li>Ext 'fi-finvoice-operator' matches pattern `^[A-Za-z0-9]{2,35}$`</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-20` Customer 'fi-finvoice-operator' extension must be 2 to 35 letters or digits (Finvoice ToIntermediator) |
> | `code` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-21` Invoice code is required (Finvoice InvoiceNumber) |
> | `attachments` | <ul><li>Empty</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-22` Attachments are not supported, Finvoice carries them as separate attachment messages |
> | `currency` Calculated | <ul><li>Currency fits the payment order</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-24` Currency must use at most 2 decimals (Finvoice EpiInstructedAmount) |
> | `preceding` | <ul><li>One preceding document</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-43` At most one preceding document is allowed (Finvoice OriginalInvoiceNumber) |
> | `preceding[*]` | <ul><li>Document number fits</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-25` Preceding document number must be at most 20 characters (Finvoice OriginalInvoiceNumber) |
> | `ordering` | <ul><li>Ordering references fit</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-26` Ordering references must be at most 70 characters (Finvoice BuyerReferenceIdentifier, SellerReferenceIdentifier, OrderIdentifier, AgreementIdentifier, ProjectReferenceIdentifier, TenderReference) |
> | `ordering` | <ul><li>One reference of each kind</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-27` At most one reference of each kind is allowed (Finvoice SellerReferenceIdentifier, OrderIdentifier, AgreementIdentifier, ProjectReferenceIdentifier, TenderReference) |
> | `delivery.receiver` | <ul><li>Name and address</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-42` Delivery receiver needs a name and an address with a town and post code (Finvoice DeliveryPartyDetails) |
> | `delivery.receiver.name` | <ul><li>Rune length at least 2</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-40` Delivery receiver name must be at least 2 characters (Finvoice DeliveryOrganisationName) |
> | `delivery.receiver.identities[*].code` | <ul><li>Legal scope</li><li>Rune length at most 35</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-28` Legal identity code must be at most 35 characters (Finvoice DeliveryPartyIdentifier) |
> | `delivery.period` | <ul><li>Both dates</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-29` Delivery period must have both dates (Finvoice DeliveryPeriodDetails) |
> | `lines[*].item.ref` | <ul><li>Rune length at most 70</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-33` Item reference must be at most 70 characters (Finvoice ArticleIdentifier) |
> | `payment` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-03` Payment details are required (Finvoice EpiDetails) |
> | `payment.instructions` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-04` Payment instructions are required (Finvoice EpiDetails) |
> | `payment.instructions.key` | <ul><li>Be or starts with one of \[credit-transfer]</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-05` Payment instructions key must be credit-transfer |
> | `payment.instructions.ref` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-06` Payment reference is required (Finvoice EpiReference) |
> | `payment.instructions.ref` | <ul><li>Rune length at most 35</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-34` Payment reference must be at most 35 characters (Finvoice EpiReference) |
> | `payment.instructions.credit_transfer` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-07` Credit transfer details are required (Finvoice EpiAccountID) |
> | `payment.instructions.credit_transfer` | <ul><li>First entry has IBAN</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-08` First credit transfer IBAN is required (Finvoice EpiAccountID) |
> | `payment.instructions.credit_transfer` | <ul><li>Later entries have a BIC</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-35` Credit transfers after the first need a BIC (Finvoice SellerBic) |
> | `payment.instructions.credit_transfer[*].iban` | <ul><li>Matches `^[A-Z]{2}\d{2}[A-Z0-9]{11,30}$`, and has matching check digits</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-09` Credit transfer IBAN is not valid |
> | `payment.instructions.credit_transfer[*].bic` | <ul><li>Matches `^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$`</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-10` Credit transfer BIC is not valid (Finvoice EpiBfiIdentifier) |
> | `payment.instructions.credit_transfer[*].number` | <ul><li>Rune length between 2 and 35</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-41` Credit transfer account number must be 2 to 35 characters (Finvoice SellerAccountID) |
> | `payment.terms` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-11` Payment terms are required (Finvoice EpiDateOptionDate) |
> | `payment.terms.due_dates` | <ul><li>Present</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-12` At least one due date is required (Finvoice EpiDateOptionDate) |
> | `payment.terms.due_dates` | <ul><li>Length at most 1</li></ul> | `GOBL-FI-FINVOICE-BILL-INVOICE-36` At most one due date is allowed (Finvoice EpiDateOptionDate) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.