Implentation for old invoice API: Example for the newer api