Corrected curl options. Added working list invoice function