Customer metadata fields

The invoice customer's fields are retrieved from the Stripe Customer object in case you're using it. The mapping between the Stripe Customer object and the invoice customer is done by using:

If you integrate the Stripe Payments service (e.g. Stripe Checkout) you will need to provide customer's information as metadata.

The following fields can be set as metadata information on the Stripe customer.

Recipient code aka "Codice Destinatario"

The codice_destinatario serves as a critical identifier in the Italian electronic invoicing processes, ensuring invoices are correctly directed to recipients within the SDI invoicing system. For both B2C and B2B invoices, our system searches for this field within the customer metadata. If the codice_destinatario is found, it's utilized accordingly. However, if it's absent and the customer is Italian, our system defaults to the value 0000000 to ensure proper routing within the Italian electronic invoicing framework. Conversely, if the customer is not Italian, the system uses the value XXXXXXXX as a default. This systematic approach guarantees that invoices are accurately addressed and transmitted within the electronic invoicing ecosystem, enhancing efficiency and compliance.

It follows an example of the customer payload with the metadata information:

Copy
Copied
{
  "id": "cus_xxxx",
  "object": "customer",
  ...
  "metadata": {
    "codice_destinatario": "ABC1234"
  },
  ...
}

Fiscal Code

The fiscal_code is a crucial component specifically for B2C (Business-to-Consumer) invoices, ensuring compliance and accurate identification of individuals within the invoicing process. Our system meticulously searches for this field within the customer metadata exclusively for B2C invoices. In the event that the fiscal_code is not available for a B2C invoice, our system initiates a fail-safe mechanism, preventing the invoice from proceeding. This rigorous validation process is essential for regulatory adherence and operational integrity, safeguarding against errors and discrepancies in B2C invoicing scenarios. By enforcing the presence of the "Fiscal Code," our system upholds the highest standards of compliance and accuracy in electronic invoicing for B2C transactions.

Here is a sample code snippet of such payload:

Copy
Copied
{
  "id": "cus_xxxx",
  "object": "customer",
  ...
  "metadata": {
    "fiscal_code": "12345678901"
  },
  ...
}

Split payment

The split_payment field is used to indicate whether the invoice is subject to split payment. This field is used to determine whether the invoice should be processed as a split payment invoice.