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.
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.
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.
Required only if the receipt is about B2B services/items |
||||
Required only if the receipt is about B2B services/items |
||||
Required only if the receipt is about B2B services/items |
||||
Required only if the receipt is about B2B services/items |
||||
Required only if the receipt is about B2B services/items |
||||
Required only if the receipt is about B2B services/items |
||||
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
- JSON Format
{
"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"
}
- Base64 format
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!