I have got a code that create an invoice. However, at the moment all the invoice is set to draft. Is there a way to programmatically set the status of an invoice from draft to live and just leave it as draft on the development environment.
You can use the Invoice_Send endpoint and set both SendByEmail and SendBySnailMail to false. This will then do the same as selecting “Flag invoice as sent” would in the UI.
“Snail mail” is another word for post. We’ll arrange for the invoice to be printed, put into an envelope, and sent to the address on the invoice itself. There are certain requirements for this, and a small fee for it too.