Fiscalisation Data Object Syntax

Overview

In the fiscalisationData object should be specified all the data for the fiscalisation services provided by Viva. The object should have the below structure:

{
   "lineItems":[
      {
         "amount":1000,
         "description":"Coffee Latte",
         "position":1,
         "productBarcode":"1234567890123",
         "productNumber":15709,
         "quantity":1,
         "vatAmount":240,
         "vatRate":2400,
         "processingIndicator":"5139205309155246083"
      },
      {
         "amount":500,
         "description":"Coffee Cappuccino",
         "position":2,
         "productBarcode":"1234567890200",
         "productNumber":15710,
         "quantity":2,
         "vatAmount":120,
         "vatRate":2400,
         "processingIndicator":"5139205309125846083"
      }
   ],
   "payments":[
      {
         "amount":2000,
         "dateTime":"2025-02-03T09:32:41.604Z",
         "description":"Payment via card",
         "position":1,
         "processingIndicator":"5139205309155246083"
      }
   ],
   "processingIndicator":"5139205309155246081",
   "customerVatNumber":"EL036098541",
   "customerName":"Professional Services LTD",
   "customerCountryCode":"GR",
   "customerStreet":"Amarousiou Chalandriou 18-20",
   "customerCity":"Athens",
   "customerZip":"15125",
   "receiptDateTime":"2025-02-03T09:32:41.604Z",
   "receiptUniqueReference":"fiscal-12345678"
}

The fiscalisationData object value, should be provided in base64 format.

Structure

The fiscalisationData object consists of the below parts:

A) LineItems Array

The lineItems is an array of the items/products that the invoice includes.

Value
Description
Example
Max Length
Required
amount
The amount with VAT of each item/product
1000 = 10 euro
4 integers where tha last two linked with the decimals
description
The description of the item/product
Coffee Latte
100 characters
position
The position on the receipt
1
An integer
productBarcode
The product barcode content passed through from the cashier system
1234567890123
50 characters
productNumber
The product number passed through from the cashier system
15709
50 characters
quantity
The quantity of this specific product item
2
An integer
vatAmount
The VAT amount that applied to this specific product
240
100 characters
vatRate
The VAT rate that applied to this specific product
2400 (as value, not 24% in percentange)
4 characters
processingIndicator
You may find all the possible values of the process indicator here
5139205309125846083
50 characters

Example

The order includes two products, one Coffee Latte and two Coffee Cappuccino, with grand total amount of 20 euro (1 item Coffee Latte x 10 euro + 2 Coffees Cappuccino x 5 euro). The line item array, will be the below:

"lineItems":[
      {
         "amount":1000,
         "description":"Coffee Latte",
         "position":1,
         "productBarcode":"1234567890123",
         "productNumber":15709,
         "quantity":1,
         "vatAmount":240,
         "vatRate":2400,
         "processingIndicator":"5139205309155246083"
      },
      {
         "amount":500,
         "description":"Coffee Cappuccino",
         "position":2,
         "productBarcode":"1234567890200",
         "productNumber":15710,
         "quantity":2,
         "vatAmount":120,
         "vatRate":2400,
         "processingIndicator":"5139205309125846083"
      }
   ]

B) Payments Array

The payments is an array with the payment details of the items for this order.

Value
Description
Example
Max Length
Required
amount
The grand total amount of the payment
2000 = 20 euro
4 integers where tha last two linked with the decimals
dateTime
The payment’s date and time
2025-02-03T09:32:41.604Z
The value of this constant is equivalent to 23:59:59.9999999 UTC, December 31, 9999 in the Gregorian calendar
description
A short description for this receipt
Order XXXX, Cashier 1, Central Store
50 characters
position
The position on the receipt for details
1
An integer
processingIndicator
You may find all the possible values of the process indicator paymentitem
5139205309155246083
50 characters

Example

The order includes two products, one Coffee Latte and two Coffee Cappuccino, with grand total amount of 20 euro (1 item Coffee Latte x 10 euro + 2 Coffees Cappuccino x 5 euro). The payments array, will be the below:

"payments":[
  {
      "amount":2000,
      "dateTime":"2025-02-03T09:32:41.604Z",
      "description":"Payment via card",
      "position":1,
      "processingIndicator":"5139205309155246083"
  }
]

C) Fiscalisation Data Object’s Parameters

The fiscalisationData object, except the lineItems and payments arrays, includes the below main parameters.

Value
Description
Example
Max Length
Required
processingIndicator
You may find all the possible values of the process indicator paymentitem
5139205309155246081
50 characters
customerVatNumber
The Vat Number to which the invoice is linked to
EL036098541
50 characters

Required only if the receipt is about B2B services/items
customerName
The customer’s name
Professional Services LTD
50 characters

Required only if the receipt is about B2B services/items
customerCountryCode
The country code of where the Vat Number is registered to.
GR
50 characters

Required only if the receipt is about B2B services/items
customerStreet
The customer’s street.
Amarousiou Chalandriou 18-20
50 characters

Required only if the receipt is about B2B services/items
customerCity
The customer’s city
Athens
50 characters

Required only if the receipt is about B2B services/items
customerZip
The customer’s zip code
15125
50 characters

Required only if the receipt is about B2B services/items
receiptDateTime
The receipt’s date & time
2025-02-03T09:32:41.604Z
The value of this constant is equivalent to 23:59:59.9999999 UTC, December 31, 9999 in the Gregorian calendar
receiptUniqueReference
A reference identification key for this specific receipt
fiscal-12345678
100 characters

Example

The order includes two products, one Coffee Latte and two Coffee Cappuccino, with grand total amount of 20 euro (1 item Coffee Latte x 10 euro + 2 Coffees Cappuccino x 5 euro). The payments array, will be the below:

{
   "processingIndicator":"5139205309155246081",
   "customerVatNumber":"EL036098541",
   "customerName":"Professional Services LTD",
   "customerCountryCode":"GR",
   "customerStreet":"Amarousiou Chalandriou 18-20",
   "customerCity":"Athens",
   "customerZip":"15125",
   "receiptDateTime":"2025-02-03T09:32:41.604Z",
   "receiptUniqueReference":"fiscal-12345678"
}

Encode to Base64 format

The fiscalisationData object value, should be encoded and provided in base64 format.

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. Base64 is another way to represent binary or text data.

Example

{
   "lineItems":[
      {
         "amount":1000,
         "description":"Coffee Latte",
         "position":1,
         "productBarcode":"1234567890123",
         "productNumber":15709,
         "quantity":1,
         "vatAmount":240,
         "vatRate":2400,
         "processingIndicator":"5139205309155246083"
      },
      {
         "amount":500,
         "description":"Coffee Cappuccino",
         "position":2,
         "productBarcode":"1234567890200",
         "productNumber":15710,
         "quantity":2,
         "vatAmount":120,
         "vatRate":2400,
         "processingIndicator":"5139205309125846083"
      }
   ],
   "payments":[
      {
         "amount":2000,
         "dateTime":"2025-02-03T09:32:41.604Z",
         "description":"Payment via card",
         "position":1,
         "processingIndicator":"5139205309155246083"
      }
   ],
   "processingIndicator":"5139205309155246081",
   "customerVatNumber":"EL036098541",
   "customerName":"Professional Services LTD",
   "customerCountryCode":"GR",
   "customerStreet":"Amarousiou Chalandriou 18-20",
   "customerCity":"Athens",
   "customerZip":"15125",
   "receiptDateTime":"2025-02-03T09:32:41.604Z",
   "receiptUniqueReference":"fiscal-12345678"
}
ewogICAibGluZUl0ZW1zIjpbCiAgICAgIHsKICAgICAgICAgImFtb3VudCI6MTAwMCwKICAgICAgICAgImRlc2NyaXB0aW9uIjoiQ29mZmVlIExhdHRlIiwKICAgICAgICAgInBvc2l0aW9uIjoxLAogICAgICAgICAicHJvZHVjdEJhcmNvZGUiOiIxMjM0NTY3ODkwMTIzIiwKICAgICAgICA
gInByb2R1Y3ROdW1iZXIiOjE1NzA5LAogICAgICAgICAicXVhbnRpdHkiOjEsCiAgICAgICAgICJ2YXRBbW91bnQiOjI0MCwKICAgICAgICAgInZhdFJhdGUiOjI0MDAsCiAgICAgICAgICJwcm9jZXNzaW5nSW5kaWNhdG9yIjoiNTEzOTIwNTMwOTE1NTI0NjA4MyIKICAgICAgfSwKICAgIC
AgewogICAgICAgICAiYW1vdW50Ijo1MDAsCiAgICAgICAgICJkZXNjcmlwdGlvbiI6IkNvZmZlZSBDYXBwdWNjaW5vIiwKICAgICAgICAgInBvc2l0aW9uIjoyLAogICAgICAgICAicHJvZHVjdEJhcmNvZGUiOiIxMjM0NTY3ODkwMjAwIiwKICAgICAgICAgInByb2R1Y3ROdW1iZXIiOjE1N
zEwLAogICAgICAgICAicXVhbnRpdHkiOjIsCiAgICAgICAgICJ2YXRBbW91bnQiOjEyMCwKICAgICAgICAgInZhdFJhdGUiOjI0MDAsCiAgICAgICAgICJwcm9jZXNzaW5nSW5kaWNhdG9yIjoiNTEzOTIwNTMwOTEyNTg0NjA4MyIKICAgICAgfQogICBdLAogICAicGF5bWVudHMiOlsKICAg
ICAgewogICAgICAgICAiYW1vdW50IjoyMDAwLAogICAgICAgICAiZGF0ZVRpbWUiOiIyMDI1LTAyLTAzVDA5OjMyOjQxLjYwNFoiLAogICAgICAgICAiZGVzY3JpcHRpb24iOiJQYXltZW50IHZpYSBjYXJkIiwKICAgICAgICAgInBvc2l0aW9uIjoxLAogICAgICAgICAicHJvY2Vzc2luZ0l
uZGljYXRvciI6IjUxMzkyMDUzMDkxNTUyNDYwODMiCiAgICAgIH0KICAgXSwKICAgInByb2Nlc3NpbmdJbmRpY2F0b3IiOiI1MTM5MjA1MzA5MTU1MjQ2MDgxIiwKICAgImN1c3RvbWVyVmF0TnVtYmVyIjoiRUwwMzYwOTg1NDEiLAogICAiY3VzdG9tZXJOYW1lIjoiUHJvZmVzc2lvbmFsIF
NlcnZpY2VzIExURCIsCiAgICJjdXN0b21lckNvdW50cnlDb2RlIjoiR1IiLAogICAiY3VzdG9tZXJTdHJlZXQiOiJBbWFyb3VzaW91IENoYWxhbmRyaW91IDE4LTIwIiwKICAgImN1c3RvbWVyQ2l0eSI6IkF0aGVucyIsCiAgICJjdXN0b21lclppcCI6IjE1MTI1IiwKICAgInJlY2VpcHREY
XRlVGltZSI6IjIwMjUtMDItMDNUMDk6MzI6NDEuNjA0WiIsCiAgICJyZWNlaXB0VW5pcXVlUmVmZXJlbmNlIjoiZmlzY2FsLTEyMzQ1Njc4Igp9

Get Support

If you would like to integrate with Viva, or if you have any queries about our products and solutions, please see our Contact & Support page to see how we can help!