Smartz Guide: Invoice

Smartz
Smartz Platform Blog
3 min readAug 29, 2018

Although smart contracts have been around for quite a while, their concept still remains somewhat of a mindbender for the average user. This series of articles aims to shed some light on the purpose and working principles of the selected smart contracts supported by Smartz platform thus providing you with a simple explanation in relation to each of them. Today’s article is dedicated to the Invoice, a short-term smart contract designed for transactions with Ether that facilitates the acceptance of payments for platforms working on Ethereum.

Say your platform provides certain services in exchange for Ether. How exactly should the payment for these services be accepted? The most obvious choice is to provide the address of your wallet to transfer well-earned ETH to, but there is a problem: how do you make sure that the user has transferred the accurate amount of Ether, or, in case he transfers more ETH it is needed, how do you make sure that he receives the overpaid amount back? Hey, is there a way to avoid tracing all these transactions, couldn’t this process be automated somehow?

As a matter of fact, it can be automated — just let the smart contract do all the job for you. This is exactly what Invoice is designed for: assigned to a certain product or service, it receives Ether and, if the received amount is accurate, transmits it to your wallet, self-destructing thereafter; if the user overpays, it will send the change back. The transaction is then saved in the blockchain, which allows to trace the history of the purchases made at your store.

Another cool thing about Invoice is that you can vary the expiration (self-destruction) date, for instance, set it up for 24 hours, which allows to change the price of a certain product on daily basis (given the fact that this feature is included into the contract code, your customer will certainly be aware about the terms of transaction). You can also attach additional textual descriptions to the smart contract in order to provide the user with info about certain product or service. All in all, Invoice is just a better means of accepting payments that allows to avoid the problems discussed above.

The deployment of Invoice on the Smartz platform is actually not that big of a deal even for a non-tech savvy person: if it is the first smart-contract you’re working with, you can use a simple step-by-step guide on how to deploy relatively similar smart contracts, watch the video below or visit this page to learn more about its specific functions and the details of its deployment in general. The whole process can be best described as intuitive, since both mentioned guides are self-explanatory.

Check out our website if you want to know more about the project. More info on the supported smart contracts will follow. Stay tuned for the further updates!

--

--