Blockchain: Tracking and tracing your invoice’s international journey

The Dynamic Duo of Invoice and Blockchain – Episode 1

| | Head of Research, SEEBURGER
There are stories behind an invoice – let the blockchain help you discover them.

Invoices tell exciting stories, for example about the journey olive oil, nougat and rice cakes have taken from France to La Réunion in the Indian Ocean. On this journey, the invoices have had to comply with several country-specific requirements. These often require specialist technical solutions, which need to quickly and simply adapt to local retail systems and constantly changing specifications and regulations. This three-part blog series looks at an example blockchain, and how it integrates with a global system landscape to create a tamper-proof, trustworthy digital basis for innovative applications across borders.

Come and discover the stories behind the e-invoices, learn more about decentralised solutions and practise thinking differently about how a set up a process.

In this series, we will look at various scenarios for smart contracts. A smart contract is a program that runs on the blockchain and regulates transactions between the various participants. You will meet the people behind the invoices and discover a data model which records the information needed for the various scenarios and which would usually be saved in several different places. In our case, data is saved in the blockchain.

Let’s meet the actors and discover their roles within the blockchain!

The people behind our blockchain and their roles

Name: Tony Dubois
Blockchain role: Trader and blockchain initiator
Location: Côte d‘Azur

Tony Dubois runs an online shop from Côte d’Azur. He sells high-grade olive oil from his own olive farm worldwide, alongside other products he buys in to extend his product range. He is also the initiator of our example blockchain, which has just been extended with further online shops and tax authorities. The shops manage their own users decentrally, and develop their own apps.

As the number of online stores increases, the number of customers accessing the blockchain through particularly online stores increases.

Smart Contracts govern what the various actors can do and when in the blockchain
Figure1: Smart Contracts govern what the various actors can do and when in the blockchain

Name: Stéphanie Hoarau
Blockchain role: Purchaser
Location: La Réunion

Stéphanie Hoarau runs a hotel in La Réunion. She is a purchaser in our blockchain, ordering olive oil, rice cakes and nougat from Tony Dubois. Her invoice contains a detailed list of the products she has ordered and the various prices, including any discounts. There is an entry in the free text field on the invoice stating that delivery is free of charge. The order is also tax-exempt.

Stéphanie Hoarau’s invoice

Figure 2: Stéphanie Hoarau’s invoice (Source: Factur-X-Project GitHub, Sample Invoices)

Name: Alexandre Payet
Blockchain role: Purchaser
Location: Lyon, France

Alexandre Payet from Lyon, France, orders olive oil and nougat. These products have different VAT rates in France. He is granted a 10% discount on the nougat and free delivery. He pays a deposit of 30% and is given a payment period of 30 days to settle the difference. Later on, he receives a discount as some of the nougat and olive oil arrive damaged.

Alexandre Payet’s invoice

Figure 3: Alexandre Payet’s invoice (Source: Factur-X-Project GitHub, Sample Invoices)

The technical stuff behind the invoices in the blockchain

 Participating in the block chain through an app

Stéphanie Hoarau participates in the block chain through an app provided by the online shop. The certificate confirming her blockchain ID X.509 is saved in her electronic wallet. The smart contract will now allow her to carry out certain tasks. She can view all data pertaining to her invoices from this online shop. She can also confirm that she has received an invoice and the correct goods. The online shop can generate invoices and the data from these is saved in the blockchain. The online shop can also view any invoice data which belongs to them.

The people behind the blockchain transactions and their roles
Figure 4: The people behind the blockchain transactions and their roles

The roles and relationships behind the people in the following paragraphs are shown in figure 4, above.

Participating in the blockchain through a peer node

Name: Auguste Boucher
Blockchain role: Tax office/tax inspector
Location: Lyon, France

The regional tax offices responsible for Lyon and La Réunion participate in the blockchain through their own peer nodes. Auguste Boucher from the Lyonnais tax office confirms that tax has been paid on the invoice. This information can be seen by all involved, but only a specific tax office is able to create this entry. The tax authorities see all invoices from all invoice shops or are automatically informed when money changes hands. If the invoice specifies a tax exemption, then no tax is paid.

The arrival date recorded in a block can be used to issue a proof of arrival, needed in some countries for tax purposes. Equally, it is easy to extract data on the net worth of goods exported in a financial year by an online shop and use this, too, for tax purposes.

Name: Emma Steiner
Blockchain role: Factor
Location: Austria

Tony Dubois sells his invoice to Alexandre Payet to Emma Steiner’s factoring agency, who are members of the blockchain through their own peer node. The invoice rights transfer to the new owner and the blockchain ensures that there can be no double sales. After the sale, the online store can neither access the invoice nor execute any transactions for it. The transfer is documented in the blockchain, where the buyer can also find out about it.

Name: Pedro Sanchez
Blockchain role: Customer, reseller
Location: Andalucía, Spain

Pedro Sanchez is a reseller from Andalucía and one of Tony Dubois‘ customers. His two roles in the blockchain are both performed through his own peer node.

Documenting transactions beyond the blockchain

Name: Christophe Monet
Blockchain role: pays for his goods by bank transfer
Location: France

The invoice to the hotel in La Réunion is still owing. Unexpectedly, Christophe Monet pays by bank transfer. He does not participate in the blockchain, not even through an app. However, this step is also immutably recorded in the blockchain and can be seen by the end recipient.

The data model behind the invoices in a blockchain

An invoice contains a detailed list of the goods ordered. An invoice is sent to the customer and its data is saved either in the online shop or a data lake.

  • The data model takes the minimal amount of information needed to fulfil its tasks. The information is taken directly from the invoice and will cover the following functions (cf. figure 5):

The invoice is hashed to ensure that the invoice saved in the blockchain is identical to the original invoice. The hash also enables you to find the data record in the block chain for an invoice.

The hash value is set when the record is created. The other fields can be arranged in different ways. They cover a variety of scenarios. This means, for example, that payment can either be settled in full or in instalments. The field itself shows the current amount. The information in the blockchain lets you reconstruct how a process played out at any time, or even used for analytics. You can also set different languages for e.g. a country-specific position. In an invoice is sold in, this is shown in a dedicated field. By viewing this and the owner field, the debtor can see the new development without having to reconstruct it from the other records.

The ‘owner’ of an invoice must participate in the blockchain through their own peer node. Other parties involved don’t necessarily need to use a peer node, an API or even an app. The owner field is therefore associated with a peer node, while the payment received field supports several options from beyond the blockchain, such as Western Union or a bank transfer.

The data model can be altered or expanded at any time. In our blockchain, an entry is visible to those involved with it. However, if an invoice is sold on –known as subrogation – it can no longer by seen by the original issuer.

The data model behind an invoice stored in the blockchain
Figure 5: The data model behind an invoice stored in the blockchain

Coming up: Discover how to put this in to practice in part 2

Now that you have been introduced to the people, situations and data model behind our example blockchain, part 2 of the trilogy looks at how to deal with the various situations from a technical point of view. With the help of our SEEBURGER open source project and the Hyperledger frameworks, we’ll look at the ways you could use a blockchain.

Read more about blockchain and what it can do for you in our further articles:

Get in contact with us:

Please enter details about your project in the message section so we can direct your inquiry to the right consultant.

Share this post, choose your platform!

Written by:

Dr. Johannes Strassner, Head of Research, is responsible for application-oriented research on innovation of SEEBURGER's business integration technologies and solutions. The current focus is on Machine Learning, Big Data, API, Blockchain and IoT. Johannes Strassner received his doctorate at the University of Koblenz-Landau for his work on ‘Parametrizable Human Models for Dialogue Environments’. He joined SEEBURGER in 2011 after research activities at the Massachusetts Institute of Technology and the Fraunhofer-Gesellschaft.