There are established digital invoicing standards. For example, in Switzerland eBill; in Germany ZUGFeRD and more recently XRechnung. These have been around for 20 years.
Also have a look at the "U.S. e-Invoicing Pilot".
EDIFACT ist an old global standard from the 70ies that is still in use for invoicing. Only B2B and B2G.